mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-bca79aa311ed4c01/out/
ualberta.rs

1#![doc = "MAVLink ualberta dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#![allow(clippy::match_single_binding)]
6#[cfg(feature = "arbitrary")]
7use arbitrary::Arbitrary;
8#[allow(unused_imports)]
9use bitflags::{bitflags, Flags};
10#[allow(unused_imports)]
11use mavlink_core::{
12    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
13};
14#[allow(unused_imports)]
15use num_derive::{FromPrimitive, ToPrimitive};
16#[allow(unused_imports)]
17use num_traits::{FromPrimitive, ToPrimitive};
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32    #[doc = "Do nothing."]
33    ACTUATOR_CONFIGURATION_NONE = 0,
34    #[doc = "Command the actuator to beep now."]
35    ACTUATOR_CONFIGURATION_BEEP = 1,
36    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49    fn default() -> Self {
50        Self::DEFAULT
51    }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62    #[doc = "No function (disabled)."]
63    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64    #[doc = "Motor 1"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66    #[doc = "Motor 2"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68    #[doc = "Motor 3"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70    #[doc = "Motor 4"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72    #[doc = "Motor 5"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74    #[doc = "Motor 6"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76    #[doc = "Motor 7"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78    #[doc = "Motor 8"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80    #[doc = "Motor 9"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82    #[doc = "Motor 10"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84    #[doc = "Motor 11"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86    #[doc = "Motor 12"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88    #[doc = "Motor 13"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90    #[doc = "Motor 14"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92    #[doc = "Motor 15"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94    #[doc = "Motor 16"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96    #[doc = "Servo 1"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98    #[doc = "Servo 2"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100    #[doc = "Servo 3"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102    #[doc = "Servo 4"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104    #[doc = "Servo 5"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106    #[doc = "Servo 6"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108    #[doc = "Servo 7"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110    #[doc = "Servo 8"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112    #[doc = "Servo 9"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114    #[doc = "Servo 10"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116    #[doc = "Servo 11"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118    #[doc = "Servo 12"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120    #[doc = "Servo 13"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122    #[doc = "Servo 14"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124    #[doc = "Servo 15"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126    #[doc = "Servo 16"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133    fn default() -> Self {
134        Self::DEFAULT
135    }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146    #[doc = "Altitude reported from a Baro source using QNH reference"]
147    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148    #[doc = "Altitude reported from a GNSS source"]
149    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155    fn default() -> Self {
156        Self::DEFAULT
157    }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168    ADSB_EMITTER_TYPE_NO_INFO = 0,
169    ADSB_EMITTER_TYPE_LIGHT = 1,
170    ADSB_EMITTER_TYPE_SMALL = 2,
171    ADSB_EMITTER_TYPE_LARGE = 3,
172    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173    ADSB_EMITTER_TYPE_HEAVY = 5,
174    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177    ADSB_EMITTER_TYPE_GLIDER = 9,
178    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179    ADSB_EMITTER_TYPE_PARACHUTE = 11,
180    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182    ADSB_EMITTER_TYPE_UAV = 14,
183    ADSB_EMITTER_TYPE_SPACE = 15,
184    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224    #[doc = "Under way using engine."]
225    UNDER_WAY = 0,
226    AIS_NAV_ANCHORED = 1,
227    AIS_NAV_UN_COMMANDED = 2,
228    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230    AIS_NAV_MOORED = 5,
231    AIS_NAV_AGROUND = 6,
232    AIS_NAV_FISHING = 7,
233    AIS_NAV_SAILING = 8,
234    AIS_NAV_RESERVED_HSC = 9,
235    AIS_NAV_RESERVED_WIG = 10,
236    AIS_NAV_RESERVED_1 = 11,
237    AIS_NAV_RESERVED_2 = 12,
238    AIS_NAV_RESERVED_3 = 13,
239    #[doc = "Search And Rescue Transponder."]
240    AIS_NAV_AIS_SART = 14,
241    #[doc = "Not available (default)."]
242    AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245    pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248    fn default() -> Self {
249        Self::DEFAULT
250    }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261    #[doc = "Not available (default)."]
262    AIS_TYPE_UNKNOWN = 0,
263    AIS_TYPE_RESERVED_1 = 1,
264    AIS_TYPE_RESERVED_2 = 2,
265    AIS_TYPE_RESERVED_3 = 3,
266    AIS_TYPE_RESERVED_4 = 4,
267    AIS_TYPE_RESERVED_5 = 5,
268    AIS_TYPE_RESERVED_6 = 6,
269    AIS_TYPE_RESERVED_7 = 7,
270    AIS_TYPE_RESERVED_8 = 8,
271    AIS_TYPE_RESERVED_9 = 9,
272    AIS_TYPE_RESERVED_10 = 10,
273    AIS_TYPE_RESERVED_11 = 11,
274    AIS_TYPE_RESERVED_12 = 12,
275    AIS_TYPE_RESERVED_13 = 13,
276    AIS_TYPE_RESERVED_14 = 14,
277    AIS_TYPE_RESERVED_15 = 15,
278    AIS_TYPE_RESERVED_16 = 16,
279    AIS_TYPE_RESERVED_17 = 17,
280    AIS_TYPE_RESERVED_18 = 18,
281    AIS_TYPE_RESERVED_19 = 19,
282    #[doc = "Wing In Ground effect."]
283    AIS_TYPE_WIG = 20,
284    AIS_TYPE_WIG_HAZARDOUS_A = 21,
285    AIS_TYPE_WIG_HAZARDOUS_B = 22,
286    AIS_TYPE_WIG_HAZARDOUS_C = 23,
287    AIS_TYPE_WIG_HAZARDOUS_D = 24,
288    AIS_TYPE_WIG_RESERVED_1 = 25,
289    AIS_TYPE_WIG_RESERVED_2 = 26,
290    AIS_TYPE_WIG_RESERVED_3 = 27,
291    AIS_TYPE_WIG_RESERVED_4 = 28,
292    AIS_TYPE_WIG_RESERVED_5 = 29,
293    AIS_TYPE_FISHING = 30,
294    AIS_TYPE_TOWING = 31,
295    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296    AIS_TYPE_TOWING_LARGE = 32,
297    #[doc = "Dredging or other underwater ops."]
298    AIS_TYPE_DREDGING = 33,
299    AIS_TYPE_DIVING = 34,
300    AIS_TYPE_MILITARY = 35,
301    AIS_TYPE_SAILING = 36,
302    AIS_TYPE_PLEASURE = 37,
303    AIS_TYPE_RESERVED_20 = 38,
304    AIS_TYPE_RESERVED_21 = 39,
305    #[doc = "High Speed Craft."]
306    AIS_TYPE_HSC = 40,
307    AIS_TYPE_HSC_HAZARDOUS_A = 41,
308    AIS_TYPE_HSC_HAZARDOUS_B = 42,
309    AIS_TYPE_HSC_HAZARDOUS_C = 43,
310    AIS_TYPE_HSC_HAZARDOUS_D = 44,
311    AIS_TYPE_HSC_RESERVED_1 = 45,
312    AIS_TYPE_HSC_RESERVED_2 = 46,
313    AIS_TYPE_HSC_RESERVED_3 = 47,
314    AIS_TYPE_HSC_RESERVED_4 = 48,
315    AIS_TYPE_HSC_UNKNOWN = 49,
316    AIS_TYPE_PILOT = 50,
317    #[doc = "Search And Rescue vessel."]
318    AIS_TYPE_SAR = 51,
319    AIS_TYPE_TUG = 52,
320    AIS_TYPE_PORT_TENDER = 53,
321    #[doc = "Anti-pollution equipment."]
322    AIS_TYPE_ANTI_POLLUTION = 54,
323    AIS_TYPE_LAW_ENFORCEMENT = 55,
324    AIS_TYPE_SPARE_LOCAL_1 = 56,
325    AIS_TYPE_SPARE_LOCAL_2 = 57,
326    AIS_TYPE_MEDICAL_TRANSPORT = 58,
327    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328    AIS_TYPE_NONECOMBATANT = 59,
329    AIS_TYPE_PASSENGER = 60,
330    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338    AIS_TYPE_PASSENGER_UNKNOWN = 69,
339    AIS_TYPE_CARGO = 70,
340    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344    AIS_TYPE_CARGO_RESERVED_1 = 75,
345    AIS_TYPE_CARGO_RESERVED_2 = 76,
346    AIS_TYPE_CARGO_RESERVED_3 = 77,
347    AIS_TYPE_CARGO_RESERVED_4 = 78,
348    AIS_TYPE_CARGO_UNKNOWN = 79,
349    AIS_TYPE_TANKER = 80,
350    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354    AIS_TYPE_TANKER_RESERVED_1 = 85,
355    AIS_TYPE_TANKER_RESERVED_2 = 86,
356    AIS_TYPE_TANKER_RESERVED_3 = 87,
357    AIS_TYPE_TANKER_RESERVED_4 = 88,
358    AIS_TYPE_TANKER_UNKNOWN = 89,
359    AIS_TYPE_OTHER = 90,
360    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364    AIS_TYPE_OTHER_RESERVED_1 = 95,
365    AIS_TYPE_OTHER_RESERVED_2 = 96,
366    AIS_TYPE_OTHER_RESERVED_3 = 97,
367    AIS_TYPE_OTHER_RESERVED_4 = 98,
368    AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383    fn default() -> Self {
384        Self::DEFAULT
385    }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396    #[doc = "Autotune roll axis."]
397    AUTOTUNE_AXIS_ROLL = 1,
398    #[doc = "Autotune pitch axis."]
399    AUTOTUNE_AXIS_PITCH = 2,
400    #[doc = "Autotune yaw axis."]
401    AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407    fn default() -> Self {
408        Self::DEFAULT
409    }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416    fn default() -> Self {
417        Self::DEFAULT
418    }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429    #[doc = "Camera is in image/photo capture mode."]
430    CAMERA_MODE_IMAGE = 0,
431    #[doc = "Camera is in video capture mode."]
432    CAMERA_MODE_VIDEO = 1,
433    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434    CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440    fn default() -> Self {
441        Self::DEFAULT
442    }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453    #[doc = "Default camera source."]
454    CAMERA_SOURCE_DEFAULT = 0,
455    #[doc = "RGB camera source."]
456    CAMERA_SOURCE_RGB = 1,
457    #[doc = "IR camera source."]
458    CAMERA_SOURCE_IR = 2,
459    #[doc = "NDVI camera source."]
460    CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479    #[doc = "Not tracking"]
480    CAMERA_TRACKING_MODE_NONE = 0,
481    #[doc = "Target is a point"]
482    CAMERA_TRACKING_MODE_POINT = 1,
483    #[doc = "Target is a rectangle"]
484    CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503    #[doc = "Camera is not tracking"]
504    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505    #[doc = "Camera is tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507    #[doc = "Camera tracking in error state"]
508    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537    ZOOM_TYPE_STEP = 0,
538    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539    ZOOM_TYPE_CONTINUOUS = 1,
540    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541    ZOOM_TYPE_RANGE = 2,
542    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543    ZOOM_TYPE_FOCAL_LENGTH = 3,
544    #[doc = "Zoom value as horizontal field of view in degrees."]
545    ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563    CAN_FILTER_REPLACE = 0,
564    CAN_FILTER_ADD = 1,
565    CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584    #[doc = "Changes accepted."]
585    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586    #[doc = "Invalid APN."]
587    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588    #[doc = "Invalid PIN."]
589    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590    #[doc = "Changes rejected."]
591    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592    #[doc = "PUK is required to unblock SIM card."]
593    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599    fn default() -> Self {
600        Self::DEFAULT
601    }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612    #[doc = "No error"]
613    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614    #[doc = "Error state is unknown"]
615    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616    #[doc = "SIM is required for the modem but missing"]
617    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618    #[doc = "SIM is available, but not usable for connection"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625    fn default() -> Self {
626        Self::DEFAULT
627    }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648    fn default() -> Self {
649        Self::DEFAULT
650    }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661    #[doc = "State unknown or not reportable."]
662    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663    #[doc = "Modem is unusable"]
664    CELLULAR_STATUS_FLAG_FAILED = 1,
665    #[doc = "Modem is being initialized"]
666    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667    #[doc = "Modem is locked"]
668    CELLULAR_STATUS_FLAG_LOCKED = 3,
669    #[doc = "Modem is not enabled and is powered down"]
670    CELLULAR_STATUS_FLAG_DISABLED = 4,
671    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672    CELLULAR_STATUS_FLAG_DISABLING = 5,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674    CELLULAR_STATUS_FLAG_ENABLING = 6,
675    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676    CELLULAR_STATUS_FLAG_ENABLED = 7,
677    #[doc = "Modem is searching for a network provider to register"]
678    CELLULAR_STATUS_FLAG_SEARCHING = 8,
679    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680    CELLULAR_STATUS_FLAG_REGISTERED = 9,
681    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684    CELLULAR_STATUS_FLAG_CONNECTING = 11,
685    #[doc = "One or more packet data bearers is active and connected"]
686    CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692    fn default() -> Self {
693        Self::DEFAULT
694    }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706    COMP_METADATA_TYPE_GENERAL = 0,
707    #[doc = "Parameter meta data."]
708    COMP_METADATA_TYPE_PARAMETER = 1,
709    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710    COMP_METADATA_TYPE_COMMANDS = 2,
711    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712    COMP_METADATA_TYPE_PERIPHERALS = 3,
713    #[doc = "Meta data for the events interface."]
714    COMP_METADATA_TYPE_EVENTS = 4,
715    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716    COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722    fn default() -> Self {
723        Self::DEFAULT
724    }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735    #[doc = "Traditional PPM ESC."]
736    ESC_CONNECTION_TYPE_PPM = 0,
737    #[doc = "Serial Bus connected ESC."]
738    ESC_CONNECTION_TYPE_SERIAL = 1,
739    #[doc = "One Shot PPM ESC."]
740    ESC_CONNECTION_TYPE_ONESHOT = 2,
741    #[doc = "I2C ESC."]
742    ESC_CONNECTION_TYPE_I2C = 3,
743    #[doc = "CAN-Bus ESC."]
744    ESC_CONNECTION_TYPE_CAN = 4,
745    #[doc = "DShot ESC."]
746    ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752    fn default() -> Self {
753        Self::DEFAULT
754    }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770    fn default() -> Self {
771        Self::DEFAULT
772    }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783    #[doc = "No failure injected, used to reset a previous failure."]
784    FAILURE_TYPE_OK = 0,
785    #[doc = "Sets unit off, so completely non-responsive."]
786    FAILURE_TYPE_OFF = 1,
787    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788    FAILURE_TYPE_STUCK = 2,
789    #[doc = "Unit is reporting complete garbage."]
790    FAILURE_TYPE_GARBAGE = 3,
791    #[doc = "Unit is consistently wrong."]
792    FAILURE_TYPE_WRONG = 4,
793    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794    FAILURE_TYPE_SLOW = 5,
795    #[doc = "Data of unit is delayed in time."]
796    FAILURE_TYPE_DELAYED = 6,
797    #[doc = "Unit is sometimes working, sometimes not."]
798    FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804    fn default() -> Self {
805        Self::DEFAULT
806    }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817    FAILURE_UNIT_SENSOR_GYRO = 0,
818    FAILURE_UNIT_SENSOR_ACCEL = 1,
819    FAILURE_UNIT_SENSOR_MAG = 2,
820    FAILURE_UNIT_SENSOR_BARO = 3,
821    FAILURE_UNIT_SENSOR_GPS = 4,
822    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823    FAILURE_UNIT_SENSOR_VIO = 6,
824    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826    FAILURE_UNIT_SYSTEM_BATTERY = 100,
827    FAILURE_UNIT_SYSTEM_MOTOR = 101,
828    FAILURE_UNIT_SYSTEM_SERVO = 102,
829    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849    #[doc = "No last fence breach"]
850    FENCE_BREACH_NONE = 0,
851    #[doc = "Breached minimum altitude"]
852    FENCE_BREACH_MINALT = 1,
853    #[doc = "Breached maximum altitude"]
854    FENCE_BREACH_MAXALT = 2,
855    #[doc = "Breached fence boundary"]
856    FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875    #[doc = "Unknown"]
876    FENCE_MITIGATE_UNKNOWN = 0,
877    #[doc = "No actions being taken"]
878    FENCE_MITIGATE_NONE = 1,
879    #[doc = "Velocity limiting active to prevent breach"]
880    FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886    fn default() -> Self {
887        Self::DEFAULT
888    }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899    #[doc = "Maximum altitude fence"]
900    FENCE_TYPE_ALT_MAX = 1,
901    #[doc = "Circle fence"]
902    FENCE_TYPE_CIRCLE = 2,
903    #[doc = "Polygon fence"]
904    FENCE_TYPE_POLYGON = 4,
905    #[doc = "Minimum altitude fence"]
906    FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925    #[doc = "development release"]
926    FIRMWARE_VERSION_TYPE_DEV = 0,
927    #[doc = "alpha release"]
928    FIRMWARE_VERSION_TYPE_ALPHA = 64,
929    #[doc = "beta release"]
930    FIRMWARE_VERSION_TYPE_BETA = 128,
931    #[doc = "release candidate"]
932    FIRMWARE_VERSION_TYPE_RC = 192,
933    #[doc = "official stable release"]
934    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940    fn default() -> Self {
941        Self::DEFAULT
942    }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949    fn default() -> Self {
950        Self::DEFAULT
951    }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958    fn default() -> Self {
959        Self::DEFAULT
960    }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998    #[doc = "No GPS connected"]
999    GPS_FIX_TYPE_NO_GPS = 0,
1000    #[doc = "No position information, GPS is connected"]
1001    GPS_FIX_TYPE_NO_FIX = 1,
1002    #[doc = "2D position"]
1003    GPS_FIX_TYPE_2D_FIX = 2,
1004    #[doc = "3D position"]
1005    GPS_FIX_TYPE_3D_FIX = 3,
1006    #[doc = "DGPS/SBAS aided 3D position"]
1007    GPS_FIX_TYPE_DGPS = 4,
1008    #[doc = "RTK float, 3D position"]
1009    GPS_FIX_TYPE_RTK_FLOAT = 5,
1010    #[doc = "RTK Fixed, 3D position"]
1011    GPS_FIX_TYPE_RTK_FIXED = 6,
1012    #[doc = "Static fixed, typically used for base stations"]
1013    GPS_FIX_TYPE_STATIC = 7,
1014    #[doc = "PPP, 3D position."]
1015    GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030    fn default() -> Self {
1031        Self::DEFAULT
1032    }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043    #[doc = "Gripper release cargo."]
1044    GRIPPER_ACTION_RELEASE = 0,
1045    #[doc = "Gripper grab onto cargo."]
1046    GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052    fn default() -> Self {
1053        Self::DEFAULT
1054    }
1055}
1056bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1057impl HighresImuUpdatedFlags {
1058    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1059}
1060impl Default for HighresImuUpdatedFlags {
1061    fn default() -> Self {
1062        Self::DEFAULT
1063    }
1064}
1065bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1066impl HilActuatorControlsFlags {
1067    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1068}
1069impl Default for HilActuatorControlsFlags {
1070    fn default() -> Self {
1071        Self::DEFAULT
1072    }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1075impl HilSensorUpdatedFlags {
1076    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1077}
1078impl Default for HilSensorUpdatedFlags {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1084impl HlFailureFlag {
1085    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1086}
1087impl Default for HlFailureFlag {
1088    fn default() -> Self {
1089        Self::DEFAULT
1090    }
1091}
1092bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1093impl IlluminatorErrorFlags {
1094    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1095}
1096impl Default for IlluminatorErrorFlags {
1097    fn default() -> Self {
1098        Self::DEFAULT
1099    }
1100}
1101#[cfg_attr(feature = "ts", derive(TS))]
1102#[cfg_attr(feature = "ts", ts(export))]
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Modes of illuminator"]
1109pub enum IlluminatorMode {
1110    #[doc = "Illuminator mode is not specified/unknown"]
1111    ILLUMINATOR_MODE_UNKNOWN = 0,
1112    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1113    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1114    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1115    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1116}
1117impl IlluminatorMode {
1118    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1119}
1120impl Default for IlluminatorMode {
1121    fn default() -> Self {
1122        Self::DEFAULT
1123    }
1124}
1125#[cfg_attr(feature = "ts", derive(TS))]
1126#[cfg_attr(feature = "ts", ts(export))]
1127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1129#[cfg_attr(feature = "serde", serde(tag = "type"))]
1130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1131#[repr(u32)]
1132#[doc = "Type of landing target"]
1133pub enum LandingTargetType {
1134    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1135    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1136    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1137    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1138    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1139    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1140    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1141    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1142}
1143impl LandingTargetType {
1144    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1145}
1146impl Default for LandingTargetType {
1147    fn default() -> Self {
1148        Self::DEFAULT
1149    }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158pub enum MagCalStatus {
1159    MAG_CAL_NOT_STARTED = 0,
1160    MAG_CAL_WAITING_TO_START = 1,
1161    MAG_CAL_RUNNING_STEP_ONE = 2,
1162    MAG_CAL_RUNNING_STEP_TWO = 3,
1163    MAG_CAL_SUCCESS = 4,
1164    MAG_CAL_FAILED = 5,
1165    MAG_CAL_BAD_ORIENTATION = 6,
1166    MAG_CAL_BAD_RADIUS = 7,
1167}
1168impl MagCalStatus {
1169    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1170}
1171impl Default for MagCalStatus {
1172    fn default() -> Self {
1173        Self::DEFAULT
1174    }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MavArmAuthDeniedReason {
1184    #[doc = "Not a specific reason"]
1185    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1186    #[doc = "Authorizer will send the error as string to GCS"]
1187    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1188    #[doc = "At least one waypoint have a invalid value"]
1189    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1190    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1191    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1192    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1193    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1194    #[doc = "Weather is not good to fly"]
1195    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1196}
1197impl MavArmAuthDeniedReason {
1198    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1199}
1200impl Default for MavArmAuthDeniedReason {
1201    fn default() -> Self {
1202        Self::DEFAULT
1203    }
1204}
1205#[cfg_attr(feature = "ts", derive(TS))]
1206#[cfg_attr(feature = "ts", ts(export))]
1207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1209#[cfg_attr(feature = "serde", serde(tag = "type"))]
1210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1211#[repr(u32)]
1212#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1213pub enum MavAutopilot {
1214    #[doc = "Generic autopilot, full support for everything"]
1215    MAV_AUTOPILOT_GENERIC = 0,
1216    #[doc = "Reserved for future use."]
1217    MAV_AUTOPILOT_RESERVED = 1,
1218    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1219    MAV_AUTOPILOT_SLUGS = 2,
1220    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1221    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1222    #[doc = "OpenPilot, <http://openpilot.org>"]
1223    MAV_AUTOPILOT_OPENPILOT = 4,
1224    #[doc = "Generic autopilot only supporting simple waypoints"]
1225    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1226    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1228    #[doc = "Generic autopilot supporting the full mission command set"]
1229    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1230    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1231    MAV_AUTOPILOT_INVALID = 8,
1232    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1233    MAV_AUTOPILOT_PPZ = 9,
1234    #[doc = "UAV Dev Board"]
1235    MAV_AUTOPILOT_UDB = 10,
1236    #[doc = "FlexiPilot"]
1237    MAV_AUTOPILOT_FP = 11,
1238    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1239    MAV_AUTOPILOT_PX4 = 12,
1240    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1241    MAV_AUTOPILOT_SMACCMPILOT = 13,
1242    #[doc = "AutoQuad -- <http://autoquad.org>"]
1243    MAV_AUTOPILOT_AUTOQUAD = 14,
1244    #[doc = "Armazila -- <http://armazila.com>"]
1245    MAV_AUTOPILOT_ARMAZILA = 15,
1246    #[doc = "Aerob -- <http://aerob.ru>"]
1247    MAV_AUTOPILOT_AEROB = 16,
1248    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1249    MAV_AUTOPILOT_ASLUAV = 17,
1250    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1251    MAV_AUTOPILOT_SMARTAP = 18,
1252    #[doc = "AirRails - <http://uaventure.com>"]
1253    MAV_AUTOPILOT_AIRRAILS = 19,
1254    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1255    MAV_AUTOPILOT_REFLEX = 20,
1256}
1257impl MavAutopilot {
1258    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1259}
1260impl Default for MavAutopilot {
1261    fn default() -> Self {
1262        Self::DEFAULT
1263    }
1264}
1265#[cfg_attr(feature = "ts", derive(TS))]
1266#[cfg_attr(feature = "ts", ts(export))]
1267#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1269#[cfg_attr(feature = "serde", serde(tag = "type"))]
1270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1271#[repr(u32)]
1272#[doc = "Enumeration for battery charge states."]
1273pub enum MavBatteryChargeState {
1274    #[doc = "Low battery state is not provided"]
1275    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1276    #[doc = "Battery is not in low state. Normal operation."]
1277    MAV_BATTERY_CHARGE_STATE_OK = 1,
1278    #[doc = "Battery state is low, warn and monitor close."]
1279    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1280    #[doc = "Battery state is critical, return or abort immediately."]
1281    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1282    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1283    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1284    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1285    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1286    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1288    #[doc = "Battery is charging."]
1289    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1290}
1291impl MavBatteryChargeState {
1292    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1293}
1294impl Default for MavBatteryChargeState {
1295    fn default() -> Self {
1296        Self::DEFAULT
1297    }
1298}
1299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1300impl MavBatteryFault {
1301    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1302}
1303impl Default for MavBatteryFault {
1304    fn default() -> Self {
1305        Self::DEFAULT
1306    }
1307}
1308#[cfg_attr(feature = "ts", derive(TS))]
1309#[cfg_attr(feature = "ts", ts(export))]
1310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1312#[cfg_attr(feature = "serde", serde(tag = "type"))]
1313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1314#[repr(u32)]
1315#[doc = "Enumeration of battery functions"]
1316pub enum MavBatteryFunction {
1317    #[doc = "Battery function is unknown"]
1318    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1319    #[doc = "Battery supports all flight systems"]
1320    MAV_BATTERY_FUNCTION_ALL = 1,
1321    #[doc = "Battery for the propulsion system"]
1322    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1323    #[doc = "Avionics battery"]
1324    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1325    #[doc = "Payload battery"]
1326    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1327}
1328impl MavBatteryFunction {
1329    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1330}
1331impl Default for MavBatteryFunction {
1332    fn default() -> Self {
1333        Self::DEFAULT
1334    }
1335}
1336#[cfg_attr(feature = "ts", derive(TS))]
1337#[cfg_attr(feature = "ts", ts(export))]
1338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1340#[cfg_attr(feature = "serde", serde(tag = "type"))]
1341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1342#[repr(u32)]
1343#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1344pub enum MavBatteryMode {
1345    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1346    MAV_BATTERY_MODE_UNKNOWN = 0,
1347    #[doc = "Battery is auto discharging (towards storage level)."]
1348    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1349    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1350    MAV_BATTERY_MODE_HOT_SWAP = 2,
1351}
1352impl MavBatteryMode {
1353    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1354}
1355impl Default for MavBatteryMode {
1356    fn default() -> Self {
1357        Self::DEFAULT
1358    }
1359}
1360#[cfg_attr(feature = "ts", derive(TS))]
1361#[cfg_attr(feature = "ts", ts(export))]
1362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1364#[cfg_attr(feature = "serde", serde(tag = "type"))]
1365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1366#[repr(u32)]
1367#[doc = "Enumeration of battery types"]
1368pub enum MavBatteryType {
1369    #[doc = "Not specified."]
1370    MAV_BATTERY_TYPE_UNKNOWN = 0,
1371    #[doc = "Lithium polymer battery"]
1372    MAV_BATTERY_TYPE_LIPO = 1,
1373    #[doc = "Lithium-iron-phosphate battery"]
1374    MAV_BATTERY_TYPE_LIFE = 2,
1375    #[doc = "Lithium-ION battery"]
1376    MAV_BATTERY_TYPE_LION = 3,
1377    #[doc = "Nickel metal hydride battery"]
1378    MAV_BATTERY_TYPE_NIMH = 4,
1379}
1380impl MavBatteryType {
1381    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1382}
1383impl Default for MavBatteryType {
1384    fn default() -> Self {
1385        Self::DEFAULT
1386    }
1387}
1388#[cfg_attr(feature = "ts", derive(TS))]
1389#[cfg_attr(feature = "ts", ts(export))]
1390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1392#[cfg_attr(feature = "serde", serde(tag = "type"))]
1393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1394#[repr(u32)]
1395#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1396pub enum MavCmd {
1397    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1398    MAV_CMD_NAV_WAYPOINT = 16,
1399    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1400    MAV_CMD_NAV_LOITER_UNLIM = 17,
1401    #[doc = "Loiter around this waypoint for X turns"]
1402    MAV_CMD_NAV_LOITER_TURNS = 18,
1403    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1404    MAV_CMD_NAV_LOITER_TIME = 19,
1405    #[doc = "Return to launch location"]
1406    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1407    #[doc = "Land at location."]
1408    MAV_CMD_NAV_LAND = 21,
1409    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1410    MAV_CMD_NAV_TAKEOFF = 22,
1411    #[doc = "Land at local position (local frame only)"]
1412    MAV_CMD_NAV_LAND_LOCAL = 23,
1413    #[doc = "Takeoff from local position (local frame only)"]
1414    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1415    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1416    MAV_CMD_NAV_FOLLOW = 25,
1417    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1418    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1419    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1420    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1421    #[doc = "Begin following a target"]
1422    MAV_CMD_DO_FOLLOW = 32,
1423    #[doc = "Reposition the MAV after a follow target command has been sent"]
1424    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1425    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1426    MAV_CMD_DO_ORBIT = 34,
1427    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1428    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1429    MAV_CMD_NAV_ROI = 80,
1430    #[doc = "Control autonomous path planning on the MAV."]
1431    MAV_CMD_NAV_PATHPLANNING = 81,
1432    #[doc = "Navigate to waypoint using a spline path."]
1433    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1434    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1435    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1436    #[doc = "Land using VTOL mode"]
1437    MAV_CMD_NAV_VTOL_LAND = 85,
1438    #[doc = "hand control over to an external controller"]
1439    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1440    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1441    MAV_CMD_NAV_DELAY = 93,
1442    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1443    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1444    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1445    MAV_CMD_NAV_LAST = 95,
1446    #[doc = "Delay mission state machine."]
1447    MAV_CMD_CONDITION_DELAY = 112,
1448    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1449    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1450    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1451    MAV_CMD_CONDITION_DISTANCE = 114,
1452    #[doc = "Reach a certain target angle."]
1453    MAV_CMD_CONDITION_YAW = 115,
1454    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1455    MAV_CMD_CONDITION_LAST = 159,
1456    #[doc = "Set system mode."]
1457    MAV_CMD_DO_SET_MODE = 176,
1458    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1459    MAV_CMD_DO_JUMP = 177,
1460    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1461    MAV_CMD_DO_CHANGE_SPEED = 178,
1462    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1463    MAV_CMD_DO_SET_HOME = 179,
1464    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1465    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1466    MAV_CMD_DO_SET_PARAMETER = 180,
1467    #[doc = "Set a relay to a condition."]
1468    MAV_CMD_DO_SET_RELAY = 181,
1469    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1470    MAV_CMD_DO_REPEAT_RELAY = 182,
1471    #[doc = "Set a servo to a desired PWM value."]
1472    MAV_CMD_DO_SET_SERVO = 183,
1473    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1474    MAV_CMD_DO_REPEAT_SERVO = 184,
1475    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1476    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1477    #[doc = "Change altitude set point."]
1478    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1479    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1480    MAV_CMD_DO_SET_ACTUATOR = 187,
1481    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1482    MAV_CMD_DO_RETURN_PATH_START = 188,
1483    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1484    MAV_CMD_DO_LAND_START = 189,
1485    #[doc = "Mission command to perform a landing from a rally point."]
1486    MAV_CMD_DO_RALLY_LAND = 190,
1487    #[doc = "Mission command to safely abort an autonomous landing."]
1488    MAV_CMD_DO_GO_AROUND = 191,
1489    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1490    MAV_CMD_DO_REPOSITION = 192,
1491    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1492    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1493    #[doc = "Set moving direction to forward or reverse."]
1494    MAV_CMD_DO_SET_REVERSE = 194,
1495    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1496    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1497    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1499    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1500    MAV_CMD_DO_SET_ROI_NONE = 197,
1501    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1502    MAV_CMD_DO_SET_ROI_SYSID = 198,
1503    #[doc = "Control onboard camera system."]
1504    MAV_CMD_DO_CONTROL_VIDEO = 200,
1505    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1506    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1507    MAV_CMD_DO_SET_ROI = 201,
1508    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1509    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1510    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1512    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1513    #[doc = "Mission command to configure a camera or antenna mount"]
1514    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1515    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1516    #[doc = "Mission command to control a camera or antenna mount"]
1517    MAV_CMD_DO_MOUNT_CONTROL = 205,
1518    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1519    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1520    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1521    MAV_CMD_DO_FENCE_ENABLE = 207,
1522    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1523    MAV_CMD_DO_PARACHUTE = 208,
1524    #[doc = "Command to perform motor test."]
1525    MAV_CMD_DO_MOTOR_TEST = 209,
1526    #[doc = "Change to/from inverted flight."]
1527    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1528    #[doc = "Mission command to operate a gripper."]
1529    MAV_CMD_DO_GRIPPER = 211,
1530    #[doc = "Enable/disable autotune."]
1531    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1532    #[doc = "Sets a desired vehicle turn angle and speed change."]
1533    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1534    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1535    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1536    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1537    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1538    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1539    #[doc = "set id of master controller"]
1540    MAV_CMD_DO_GUIDED_MASTER = 221,
1541    #[doc = "Set limits for external control"]
1542    MAV_CMD_DO_GUIDED_LIMITS = 222,
1543    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1544    MAV_CMD_DO_ENGINE_CONTROL = 223,
1545    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1546    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1547    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1548    MAV_CMD_DO_LAST = 240,
1549    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1550    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1551    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1552    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1553    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1554    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1555    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1556    MAV_CMD_PREFLIGHT_STORAGE = 245,
1557    #[doc = "Request the reboot or shutdown of system components."]
1558    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1559    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1560    MAV_CMD_OVERRIDE_GOTO = 252,
1561    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1562    MAV_CMD_OBLIQUE_SURVEY = 260,
1563    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1564    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1565    #[doc = "start running a mission"]
1566    MAV_CMD_MISSION_START = 300,
1567    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1568    MAV_CMD_ACTUATOR_TEST = 310,
1569    #[doc = "Actuator configuration command."]
1570    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1571    #[doc = "Arms / Disarms a component"]
1572    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1573    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1574    MAV_CMD_RUN_PREARM_CHECKS = 401,
1575    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1576    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1577    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1579    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1580    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1581    MAV_CMD_GET_HOME_POSITION = 410,
1582    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1583    MAV_CMD_INJECT_FAILURE = 420,
1584    #[doc = "Starts receiver pairing."]
1585    MAV_CMD_START_RX_PAIR = 500,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1587    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1588    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1589    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1590    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1591    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1592    MAV_CMD_REQUEST_MESSAGE = 512,
1593    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1594    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1595    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1596    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1597    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1598    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1599    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1600    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1601    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1602    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1603    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1604    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1605    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1606    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1607    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1608    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_STORAGE_FORMAT = 526,
1610    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1611    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1612    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1613    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1614    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1615    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1616    #[doc = "Reset all camera settings to Factory Default"]
1617    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1618    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1619    MAV_CMD_SET_CAMERA_MODE = 530,
1620    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1621    MAV_CMD_SET_CAMERA_ZOOM = 531,
1622    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_FOCUS = 532,
1624    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1625    MAV_CMD_SET_STORAGE_USAGE = 533,
1626    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1627    MAV_CMD_SET_CAMERA_SOURCE = 534,
1628    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1629    MAV_CMD_JUMP_TAG = 600,
1630    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1631    MAV_CMD_DO_JUMP_TAG = 601,
1632    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1633    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1634    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1636    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1637    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1638    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1640    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1641    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1642    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1643    #[doc = "Enable or disable on-board camera triggering system."]
1644    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1645    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1646    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1647    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1649    #[doc = "Stops ongoing tracking."]
1650    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1651    #[doc = "Starts video capture (recording)."]
1652    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1653    #[doc = "Stop the current video capture (recording)."]
1654    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1655    #[doc = "Start video streaming"]
1656    MAV_CMD_VIDEO_START_STREAMING = 2502,
1657    #[doc = "Stop the given video stream"]
1658    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1659    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1660    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1661    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1662    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1663    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1664    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1665    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1666    MAV_CMD_LOGGING_START = 2510,
1667    #[doc = "Request to stop streaming log data over MAVLink"]
1668    MAV_CMD_LOGGING_STOP = 2511,
1669    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1670    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1671    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1672    #[doc = "Create a panorama at the current position"]
1673    MAV_CMD_PANORAMA_CREATE = 2800,
1674    #[doc = "Request VTOL transition"]
1675    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1676    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1677    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1678    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1679    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1680    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1682    #[doc = "Delay mission state machine until gate has been reached."]
1683    MAV_CMD_CONDITION_GATE = 4501,
1684    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1685    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1686    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1687    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1688    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1690    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1691    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1692    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1694    #[doc = "Rally point. You can have multiple rally points defined."]
1695    MAV_CMD_NAV_RALLY_POINT = 5100,
1696    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1697    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1698    #[doc = "Change state of safety switch."]
1699    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1700    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1701    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1702    #[deprecated = "  (Deprecated since 2021-06)"]
1703    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1704    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1705    #[deprecated = "  (Deprecated since 2021-06)"]
1706    #[doc = "Control the payload deployment."]
1707    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1708    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1709    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1710    #[doc = "Command to operate winch."]
1711    MAV_CMD_DO_WINCH = 42600,
1712    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1713    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1714    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1715    MAV_CMD_WAYPOINT_USER_1 = 31000,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_2 = 31001,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_3 = 31002,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_4 = 31003,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_5 = 31004,
1724    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1725    MAV_CMD_SPATIAL_USER_1 = 31005,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_2 = 31006,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_3 = 31007,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_4 = 31008,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_5 = 31009,
1734    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1735    MAV_CMD_USER_1 = 31010,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_2 = 31011,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_3 = 31012,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_4 = 31013,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_5 = 31014,
1744    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1745    MAV_CMD_CAN_FORWARD = 32000,
1746}
1747impl MavCmd {
1748    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1749}
1750impl Default for MavCmd {
1751    fn default() -> Self {
1752        Self::DEFAULT
1753    }
1754}
1755#[cfg_attr(feature = "ts", derive(TS))]
1756#[cfg_attr(feature = "ts", ts(export))]
1757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1759#[cfg_attr(feature = "serde", serde(tag = "type"))]
1760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1761#[repr(u32)]
1762#[doc = "Possible actions an aircraft can take to avoid a collision."]
1763pub enum MavCollisionAction {
1764    #[doc = "Ignore any potential collisions"]
1765    MAV_COLLISION_ACTION_NONE = 0,
1766    #[doc = "Report potential collision"]
1767    MAV_COLLISION_ACTION_REPORT = 1,
1768    #[doc = "Ascend or Descend to avoid threat"]
1769    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1770    #[doc = "Move horizontally to avoid threat"]
1771    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1772    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1773    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1774    #[doc = "Aircraft to fly directly back to its launch point"]
1775    MAV_COLLISION_ACTION_RTL = 5,
1776    #[doc = "Aircraft to stop in place"]
1777    MAV_COLLISION_ACTION_HOVER = 6,
1778}
1779impl MavCollisionAction {
1780    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1781}
1782impl Default for MavCollisionAction {
1783    fn default() -> Self {
1784        Self::DEFAULT
1785    }
1786}
1787#[cfg_attr(feature = "ts", derive(TS))]
1788#[cfg_attr(feature = "ts", ts(export))]
1789#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1790#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1791#[cfg_attr(feature = "serde", serde(tag = "type"))]
1792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1793#[repr(u32)]
1794#[doc = "Source of information about this collision."]
1795pub enum MavCollisionSrc {
1796    #[doc = "ID field references ADSB_VEHICLE packets"]
1797    MAV_COLLISION_SRC_ADSB = 0,
1798    #[doc = "ID field references MAVLink SRC ID"]
1799    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1800}
1801impl MavCollisionSrc {
1802    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1803}
1804impl Default for MavCollisionSrc {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809#[cfg_attr(feature = "ts", derive(TS))]
1810#[cfg_attr(feature = "ts", ts(export))]
1811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1813#[cfg_attr(feature = "serde", serde(tag = "type"))]
1814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1815#[repr(u32)]
1816#[doc = "Aircraft-rated danger from this threat."]
1817pub enum MavCollisionThreatLevel {
1818    #[doc = "Not a threat"]
1819    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1820    #[doc = "Craft is mildly concerned about this threat"]
1821    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1822    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1823    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1824}
1825impl MavCollisionThreatLevel {
1826    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1827}
1828impl Default for MavCollisionThreatLevel {
1829    fn default() -> Self {
1830        Self::DEFAULT
1831    }
1832}
1833#[cfg_attr(feature = "ts", derive(TS))]
1834#[cfg_attr(feature = "ts", ts(export))]
1835#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1837#[cfg_attr(feature = "serde", serde(tag = "type"))]
1838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1839#[repr(u32)]
1840#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1841pub enum MavComponent {
1842    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1843    MAV_COMP_ID_ALL = 0,
1844    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1845    MAV_COMP_ID_AUTOPILOT1 = 1,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER1 = 25,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER2 = 26,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER3 = 27,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER4 = 28,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER5 = 29,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER6 = 30,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER7 = 31,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER8 = 32,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER9 = 33,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER10 = 34,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER11 = 35,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER12 = 36,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER13 = 37,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER14 = 38,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER15 = 39,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER16 = 40,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER17 = 41,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER18 = 42,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER19 = 43,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER20 = 44,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER21 = 45,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER22 = 46,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER23 = 47,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER24 = 48,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER25 = 49,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER26 = 50,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER27 = 51,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER28 = 52,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER29 = 53,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER30 = 54,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER31 = 55,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER32 = 56,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER33 = 57,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER34 = 58,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER35 = 59,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER36 = 60,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER37 = 61,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER38 = 62,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER39 = 63,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER40 = 64,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER41 = 65,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER42 = 66,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER43 = 67,
1932    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1933    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER45 = 69,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER46 = 70,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER47 = 71,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER48 = 72,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER49 = 73,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER50 = 74,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER51 = 75,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER52 = 76,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER53 = 77,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER54 = 78,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER55 = 79,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER56 = 80,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER57 = 81,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER58 = 82,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER59 = 83,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER60 = 84,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER61 = 85,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER62 = 86,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER63 = 87,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER64 = 88,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER65 = 89,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER66 = 90,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER67 = 91,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER68 = 92,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER69 = 93,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER70 = 94,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER71 = 95,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER72 = 96,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER73 = 97,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER74 = 98,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER75 = 99,
1996    #[doc = "Camera #1."]
1997    MAV_COMP_ID_CAMERA = 100,
1998    #[doc = "Camera #2."]
1999    MAV_COMP_ID_CAMERA2 = 101,
2000    #[doc = "Camera #3."]
2001    MAV_COMP_ID_CAMERA3 = 102,
2002    #[doc = "Camera #4."]
2003    MAV_COMP_ID_CAMERA4 = 103,
2004    #[doc = "Camera #5."]
2005    MAV_COMP_ID_CAMERA5 = 104,
2006    #[doc = "Camera #6."]
2007    MAV_COMP_ID_CAMERA6 = 105,
2008    #[doc = "Servo #1."]
2009    MAV_COMP_ID_SERVO1 = 140,
2010    #[doc = "Servo #2."]
2011    MAV_COMP_ID_SERVO2 = 141,
2012    #[doc = "Servo #3."]
2013    MAV_COMP_ID_SERVO3 = 142,
2014    #[doc = "Servo #4."]
2015    MAV_COMP_ID_SERVO4 = 143,
2016    #[doc = "Servo #5."]
2017    MAV_COMP_ID_SERVO5 = 144,
2018    #[doc = "Servo #6."]
2019    MAV_COMP_ID_SERVO6 = 145,
2020    #[doc = "Servo #7."]
2021    MAV_COMP_ID_SERVO7 = 146,
2022    #[doc = "Servo #8."]
2023    MAV_COMP_ID_SERVO8 = 147,
2024    #[doc = "Servo #9."]
2025    MAV_COMP_ID_SERVO9 = 148,
2026    #[doc = "Servo #10."]
2027    MAV_COMP_ID_SERVO10 = 149,
2028    #[doc = "Servo #11."]
2029    MAV_COMP_ID_SERVO11 = 150,
2030    #[doc = "Servo #12."]
2031    MAV_COMP_ID_SERVO12 = 151,
2032    #[doc = "Servo #13."]
2033    MAV_COMP_ID_SERVO13 = 152,
2034    #[doc = "Servo #14."]
2035    MAV_COMP_ID_SERVO14 = 153,
2036    #[doc = "Gimbal #1."]
2037    MAV_COMP_ID_GIMBAL = 154,
2038    #[doc = "Logging component."]
2039    MAV_COMP_ID_LOG = 155,
2040    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2041    MAV_COMP_ID_ADSB = 156,
2042    #[doc = "On Screen Display (OSD) devices for video links."]
2043    MAV_COMP_ID_OSD = 157,
2044    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2045    MAV_COMP_ID_PERIPHERAL = 158,
2046    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2047    #[doc = "Gimbal ID for QX1."]
2048    MAV_COMP_ID_QX1_GIMBAL = 159,
2049    #[doc = "FLARM collision alert component."]
2050    MAV_COMP_ID_FLARM = 160,
2051    #[doc = "Parachute component."]
2052    MAV_COMP_ID_PARACHUTE = 161,
2053    #[doc = "Winch component."]
2054    MAV_COMP_ID_WINCH = 169,
2055    #[doc = "Gimbal #2."]
2056    MAV_COMP_ID_GIMBAL2 = 171,
2057    #[doc = "Gimbal #3."]
2058    MAV_COMP_ID_GIMBAL3 = 172,
2059    #[doc = "Gimbal #4"]
2060    MAV_COMP_ID_GIMBAL4 = 173,
2061    #[doc = "Gimbal #5."]
2062    MAV_COMP_ID_GIMBAL5 = 174,
2063    #[doc = "Gimbal #6."]
2064    MAV_COMP_ID_GIMBAL6 = 175,
2065    #[doc = "Battery #1."]
2066    MAV_COMP_ID_BATTERY = 180,
2067    #[doc = "Battery #2."]
2068    MAV_COMP_ID_BATTERY2 = 181,
2069    #[doc = "CAN over MAVLink client."]
2070    MAV_COMP_ID_MAVCAN = 189,
2071    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2072    MAV_COMP_ID_MISSIONPLANNER = 190,
2073    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2074    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2081    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2082    MAV_COMP_ID_PATHPLANNER = 195,
2083    #[doc = "Component that plans a collision free path between two points."]
2084    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2085    #[doc = "Component that provides position estimates using VIO techniques."]
2086    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2087    #[doc = "Component that manages pairing of vehicle and GCS."]
2088    MAV_COMP_ID_PAIRING_MANAGER = 198,
2089    #[doc = "Inertial Measurement Unit (IMU) #1."]
2090    MAV_COMP_ID_IMU = 200,
2091    #[doc = "Inertial Measurement Unit (IMU) #2."]
2092    MAV_COMP_ID_IMU_2 = 201,
2093    #[doc = "Inertial Measurement Unit (IMU) #3."]
2094    MAV_COMP_ID_IMU_3 = 202,
2095    #[doc = "GPS #1."]
2096    MAV_COMP_ID_GPS = 220,
2097    #[doc = "GPS #2."]
2098    MAV_COMP_ID_GPS2 = 221,
2099    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2100    MAV_COMP_ID_ODID_TXRX_1 = 236,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_2 = 237,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_3 = 238,
2105    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2106    MAV_COMP_ID_UDP_BRIDGE = 240,
2107    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2108    MAV_COMP_ID_UART_BRIDGE = 241,
2109    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2110    MAV_COMP_ID_TUNNEL_NODE = 242,
2111    #[doc = "Illuminator"]
2112    MAV_COMP_ID_ILLUMINATOR = 243,
2113    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2114    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2115    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2116}
2117impl MavComponent {
2118    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2119}
2120impl Default for MavComponent {
2121    fn default() -> Self {
2122        Self::DEFAULT
2123    }
2124}
2125#[cfg_attr(feature = "ts", derive(TS))]
2126#[cfg_attr(feature = "ts", ts(export))]
2127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2129#[cfg_attr(feature = "serde", serde(tag = "type"))]
2130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2131#[repr(u32)]
2132#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2133#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2134pub enum MavDataStream {
2135    #[doc = "Enable all data streams"]
2136    MAV_DATA_STREAM_ALL = 0,
2137    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2138    MAV_DATA_STREAM_RAW_SENSORS = 1,
2139    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2140    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2141    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2142    MAV_DATA_STREAM_RC_CHANNELS = 3,
2143    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2144    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2145    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2146    MAV_DATA_STREAM_POSITION = 6,
2147    #[doc = "Dependent on the autopilot"]
2148    MAV_DATA_STREAM_EXTRA1 = 10,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA2 = 11,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA3 = 12,
2153}
2154impl MavDataStream {
2155    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2156}
2157impl Default for MavDataStream {
2158    fn default() -> Self {
2159        Self::DEFAULT
2160    }
2161}
2162#[cfg_attr(feature = "ts", derive(TS))]
2163#[cfg_attr(feature = "ts", ts(export))]
2164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2166#[cfg_attr(feature = "serde", serde(tag = "type"))]
2167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2168#[repr(u32)]
2169#[doc = "Enumeration of distance sensor types"]
2170pub enum MavDistanceSensor {
2171    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2172    MAV_DISTANCE_SENSOR_LASER = 0,
2173    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2174    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2175    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2176    MAV_DISTANCE_SENSOR_INFRARED = 2,
2177    #[doc = "Radar type, e.g. uLanding units"]
2178    MAV_DISTANCE_SENSOR_RADAR = 3,
2179    #[doc = "Broken or unknown type, e.g. analog units"]
2180    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2181}
2182impl MavDistanceSensor {
2183    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2184}
2185impl Default for MavDistanceSensor {
2186    fn default() -> Self {
2187        Self::DEFAULT
2188    }
2189}
2190#[cfg_attr(feature = "ts", derive(TS))]
2191#[cfg_attr(feature = "ts", ts(export))]
2192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2194#[cfg_attr(feature = "serde", serde(tag = "type"))]
2195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2196#[repr(u32)]
2197#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2198pub enum MavDoRepositionFlags {
2199    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2200    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2201}
2202impl MavDoRepositionFlags {
2203    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2204}
2205impl Default for MavDoRepositionFlags {
2206    fn default() -> Self {
2207        Self::DEFAULT
2208    }
2209}
2210#[cfg_attr(feature = "ts", derive(TS))]
2211#[cfg_attr(feature = "ts", ts(export))]
2212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2214#[cfg_attr(feature = "serde", serde(tag = "type"))]
2215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2216#[repr(u32)]
2217#[doc = "Enumeration of estimator types"]
2218pub enum MavEstimatorType {
2219    #[doc = "Unknown type of the estimator."]
2220    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2221    #[doc = "This is a naive estimator without any real covariance feedback."]
2222    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2223    #[doc = "Computer vision based estimate. Might be up to scale."]
2224    MAV_ESTIMATOR_TYPE_VISION = 2,
2225    #[doc = "Visual-inertial estimate."]
2226    MAV_ESTIMATOR_TYPE_VIO = 3,
2227    #[doc = "Plain GPS estimate."]
2228    MAV_ESTIMATOR_TYPE_GPS = 4,
2229    #[doc = "Estimator integrating GPS and inertial sensing."]
2230    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2231    #[doc = "Estimate from external motion capturing system."]
2232    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2233    #[doc = "Estimator based on lidar sensor input."]
2234    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2235    #[doc = "Estimator on autopilot."]
2236    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2237}
2238impl MavEstimatorType {
2239    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2240}
2241impl Default for MavEstimatorType {
2242    fn default() -> Self {
2243        Self::DEFAULT
2244    }
2245}
2246#[cfg_attr(feature = "ts", derive(TS))]
2247#[cfg_attr(feature = "ts", ts(export))]
2248#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2250#[cfg_attr(feature = "serde", serde(tag = "type"))]
2251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2252#[repr(u32)]
2253#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2254pub enum MavEventCurrentSequenceFlags {
2255    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2256    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2257}
2258impl MavEventCurrentSequenceFlags {
2259    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2260}
2261impl Default for MavEventCurrentSequenceFlags {
2262    fn default() -> Self {
2263        Self::DEFAULT
2264    }
2265}
2266#[cfg_attr(feature = "ts", derive(TS))]
2267#[cfg_attr(feature = "ts", ts(export))]
2268#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2270#[cfg_attr(feature = "serde", serde(tag = "type"))]
2271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2272#[repr(u32)]
2273#[doc = "Reason for an event error response."]
2274pub enum MavEventErrorReason {
2275    #[doc = "The requested event is not available (anymore)."]
2276    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2277}
2278impl MavEventErrorReason {
2279    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2280}
2281impl Default for MavEventErrorReason {
2282    fn default() -> Self {
2283        Self::DEFAULT
2284    }
2285}
2286#[cfg_attr(feature = "ts", derive(TS))]
2287#[cfg_attr(feature = "ts", ts(export))]
2288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "serde", serde(tag = "type"))]
2291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2292#[repr(u32)]
2293#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2294pub enum MavFrame {
2295    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2296    MAV_FRAME_GLOBAL = 0,
2297    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2298    MAV_FRAME_LOCAL_NED = 1,
2299    #[doc = "NOT a coordinate frame, indicates a mission command."]
2300    MAV_FRAME_MISSION = 2,
2301    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2302    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2303    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2304    MAV_FRAME_LOCAL_ENU = 4,
2305    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2306    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2307    MAV_FRAME_GLOBAL_INT = 5,
2308    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2309    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2310    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2311    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2312    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2313    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2314    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2315    MAV_FRAME_BODY_NED = 8,
2316    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2317    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2318    MAV_FRAME_BODY_OFFSET_NED = 9,
2319    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2320    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2321    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2322    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2323    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2324    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2325    MAV_FRAME_BODY_FRD = 12,
2326    #[deprecated = "  (Deprecated since 2019-04)"]
2327    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2328    MAV_FRAME_RESERVED_13 = 13,
2329    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2330    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2331    MAV_FRAME_RESERVED_14 = 14,
2332    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2333    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2334    MAV_FRAME_RESERVED_15 = 15,
2335    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2336    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2337    MAV_FRAME_RESERVED_16 = 16,
2338    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2339    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2340    MAV_FRAME_RESERVED_17 = 17,
2341    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2342    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2343    MAV_FRAME_RESERVED_18 = 18,
2344    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2345    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2346    MAV_FRAME_RESERVED_19 = 19,
2347    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2348    MAV_FRAME_LOCAL_FRD = 20,
2349    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FLU = 21,
2351}
2352impl MavFrame {
2353    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2354}
2355impl Default for MavFrame {
2356    fn default() -> Self {
2357        Self::DEFAULT
2358    }
2359}
2360#[cfg_attr(feature = "ts", derive(TS))]
2361#[cfg_attr(feature = "ts", ts(export))]
2362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2364#[cfg_attr(feature = "serde", serde(tag = "type"))]
2365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2366#[repr(u32)]
2367#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2368pub enum MavFtpErr {
2369    #[doc = "None: No error"]
2370    MAV_FTP_ERR_NONE = 0,
2371    #[doc = "Fail: Unknown failure"]
2372    MAV_FTP_ERR_FAIL = 1,
2373    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2374    MAV_FTP_ERR_FAILERRNO = 2,
2375    #[doc = "InvalidDataSize: Payload size is invalid"]
2376    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2377    #[doc = "InvalidSession: Session is not currently open"]
2378    MAV_FTP_ERR_INVALIDSESSION = 4,
2379    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2380    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2381    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2382    MAV_FTP_ERR_EOF = 6,
2383    #[doc = "UnknownCommand: Unknown command / opcode"]
2384    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2385    #[doc = "FileExists: File/directory already exists"]
2386    MAV_FTP_ERR_FILEEXISTS = 8,
2387    #[doc = "FileProtected: File/directory is write protected"]
2388    MAV_FTP_ERR_FILEPROTECTED = 9,
2389    #[doc = "FileNotFound: File/directory not found"]
2390    MAV_FTP_ERR_FILENOTFOUND = 10,
2391}
2392impl MavFtpErr {
2393    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2394}
2395impl Default for MavFtpErr {
2396    fn default() -> Self {
2397        Self::DEFAULT
2398    }
2399}
2400#[cfg_attr(feature = "ts", derive(TS))]
2401#[cfg_attr(feature = "ts", ts(export))]
2402#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2404#[cfg_attr(feature = "serde", serde(tag = "type"))]
2405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2406#[repr(u32)]
2407#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2408pub enum MavFtpOpcode {
2409    #[doc = "None. Ignored, always ACKed"]
2410    MAV_FTP_OPCODE_NONE = 0,
2411    #[doc = "TerminateSession: Terminates open Read session"]
2412    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2413    #[doc = "ResetSessions: Terminates all open read sessions"]
2414    MAV_FTP_OPCODE_RESETSESSION = 2,
2415    #[doc = "ListDirectory. List files and directories in path from offset"]
2416    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2417    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2418    MAV_FTP_OPCODE_OPENFILERO = 4,
2419    #[doc = "ReadFile: Reads size bytes from offset in session"]
2420    MAV_FTP_OPCODE_READFILE = 5,
2421    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2422    MAV_FTP_OPCODE_CREATEFILE = 6,
2423    #[doc = "WriteFile: Writes size bytes to offset in session"]
2424    MAV_FTP_OPCODE_WRITEFILE = 7,
2425    #[doc = "RemoveFile: Remove file at path"]
2426    MAV_FTP_OPCODE_REMOVEFILE = 8,
2427    #[doc = "CreateDirectory: Creates directory at path"]
2428    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2429    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2430    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2431    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2432    MAV_FTP_OPCODE_OPENFILEWO = 11,
2433    #[doc = "TruncateFile: Truncate file at path to offset length"]
2434    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2435    #[doc = "Rename: Rename path1 to path2"]
2436    MAV_FTP_OPCODE_RENAME = 13,
2437    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2438    MAV_FTP_OPCODE_CALCFILECRC = 14,
2439    #[doc = "BurstReadFile: Burst download session file"]
2440    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2441    #[doc = "ACK: ACK response"]
2442    MAV_FTP_OPCODE_ACK = 128,
2443    #[doc = "NAK: NAK response"]
2444    MAV_FTP_OPCODE_NAK = 129,
2445}
2446impl MavFtpOpcode {
2447    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2448}
2449impl Default for MavFtpOpcode {
2450    fn default() -> Self {
2451        Self::DEFAULT
2452    }
2453}
2454#[cfg_attr(feature = "ts", derive(TS))]
2455#[cfg_attr(feature = "ts", ts(export))]
2456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2458#[cfg_attr(feature = "serde", serde(tag = "type"))]
2459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2460#[repr(u32)]
2461#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2462pub enum MavFuelType {
2463    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2464    MAV_FUEL_TYPE_UNKNOWN = 0,
2465    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2466    MAV_FUEL_TYPE_LIQUID = 1,
2467    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2468    MAV_FUEL_TYPE_GAS = 2,
2469}
2470impl MavFuelType {
2471    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2472}
2473impl Default for MavFuelType {
2474    fn default() -> Self {
2475        Self::DEFAULT
2476    }
2477}
2478bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2479impl MavGeneratorStatusFlag {
2480    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2481}
2482impl Default for MavGeneratorStatusFlag {
2483    fn default() -> Self {
2484        Self::DEFAULT
2485    }
2486}
2487#[cfg_attr(feature = "ts", derive(TS))]
2488#[cfg_attr(feature = "ts", ts(export))]
2489#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2491#[cfg_attr(feature = "serde", serde(tag = "type"))]
2492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2493#[repr(u32)]
2494#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2495pub enum MavGoto {
2496    #[doc = "Hold at the current position."]
2497    MAV_GOTO_DO_HOLD = 0,
2498    #[doc = "Continue with the next item in mission execution."]
2499    MAV_GOTO_DO_CONTINUE = 1,
2500    #[doc = "Hold at the current position of the system"]
2501    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2502    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2503    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2504}
2505impl MavGoto {
2506    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2507}
2508impl Default for MavGoto {
2509    fn default() -> Self {
2510        Self::DEFAULT
2511    }
2512}
2513#[cfg_attr(feature = "ts", derive(TS))]
2514#[cfg_attr(feature = "ts", ts(export))]
2515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2517#[cfg_attr(feature = "serde", serde(tag = "type"))]
2518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2519#[repr(u32)]
2520#[doc = "Enumeration of landed detector states"]
2521pub enum MavLandedState {
2522    #[doc = "MAV landed state is unknown"]
2523    MAV_LANDED_STATE_UNDEFINED = 0,
2524    #[doc = "MAV is landed (on ground)"]
2525    MAV_LANDED_STATE_ON_GROUND = 1,
2526    #[doc = "MAV is in air"]
2527    MAV_LANDED_STATE_IN_AIR = 2,
2528    #[doc = "MAV currently taking off"]
2529    MAV_LANDED_STATE_TAKEOFF = 3,
2530    #[doc = "MAV currently landing"]
2531    MAV_LANDED_STATE_LANDING = 4,
2532}
2533impl MavLandedState {
2534    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2535}
2536impl Default for MavLandedState {
2537    fn default() -> Self {
2538        Self::DEFAULT
2539    }
2540}
2541#[cfg_attr(feature = "ts", derive(TS))]
2542#[cfg_attr(feature = "ts", ts(export))]
2543#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2545#[cfg_attr(feature = "serde", serde(tag = "type"))]
2546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2547#[repr(u32)]
2548#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2549pub enum MavMissionResult {
2550    #[doc = "mission accepted OK"]
2551    MAV_MISSION_ACCEPTED = 0,
2552    #[doc = "Generic error / not accepting mission commands at all right now."]
2553    MAV_MISSION_ERROR = 1,
2554    #[doc = "Coordinate frame is not supported."]
2555    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2556    #[doc = "Command is not supported."]
2557    MAV_MISSION_UNSUPPORTED = 3,
2558    #[doc = "Mission items exceed storage space."]
2559    MAV_MISSION_NO_SPACE = 4,
2560    #[doc = "One of the parameters has an invalid value."]
2561    MAV_MISSION_INVALID = 5,
2562    #[doc = "param1 has an invalid value."]
2563    MAV_MISSION_INVALID_PARAM1 = 6,
2564    #[doc = "param2 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM2 = 7,
2566    #[doc = "param3 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM3 = 8,
2568    #[doc = "param4 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM4 = 9,
2570    #[doc = "x / param5 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM5_X = 10,
2572    #[doc = "y / param6 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM6_Y = 11,
2574    #[doc = "z / param7 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM7 = 12,
2576    #[doc = "Mission item received out of sequence"]
2577    MAV_MISSION_INVALID_SEQUENCE = 13,
2578    #[doc = "Not accepting any mission commands from this communication partner."]
2579    MAV_MISSION_DENIED = 14,
2580    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2581    MAV_MISSION_OPERATION_CANCELLED = 15,
2582}
2583impl MavMissionResult {
2584    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2585}
2586impl Default for MavMissionResult {
2587    fn default() -> Self {
2588        Self::DEFAULT
2589    }
2590}
2591#[cfg_attr(feature = "ts", derive(TS))]
2592#[cfg_attr(feature = "ts", ts(export))]
2593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "serde", serde(tag = "type"))]
2596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2597#[repr(u32)]
2598#[doc = "Type of mission items being requested/sent in mission protocol."]
2599pub enum MavMissionType {
2600    #[doc = "Items are mission commands for main mission."]
2601    MAV_MISSION_TYPE_MISSION = 0,
2602    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2603    MAV_MISSION_TYPE_FENCE = 1,
2604    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2605    MAV_MISSION_TYPE_RALLY = 2,
2606    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2607    MAV_MISSION_TYPE_ALL = 255,
2608}
2609impl MavMissionType {
2610    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2611}
2612impl Default for MavMissionType {
2613    fn default() -> Self {
2614        Self::DEFAULT
2615    }
2616}
2617#[cfg_attr(feature = "ts", derive(TS))]
2618#[cfg_attr(feature = "ts", ts(export))]
2619#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2621#[cfg_attr(feature = "serde", serde(tag = "type"))]
2622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2623#[repr(u32)]
2624#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2625pub enum MavMode {
2626    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2627    MAV_MODE_PREFLIGHT = 0,
2628    #[doc = "System is allowed to be active, under assisted RC control."]
2629    MAV_MODE_STABILIZE_DISARMED = 80,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_ARMED = 208,
2632    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2633    MAV_MODE_MANUAL_DISARMED = 64,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_ARMED = 192,
2636    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2637    MAV_MODE_GUIDED_DISARMED = 88,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_ARMED = 216,
2640    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2641    MAV_MODE_AUTO_DISARMED = 92,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_ARMED = 220,
2644    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2645    MAV_MODE_TEST_DISARMED = 66,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_ARMED = 194,
2648}
2649impl MavMode {
2650    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2651}
2652impl Default for MavMode {
2653    fn default() -> Self {
2654        Self::DEFAULT
2655    }
2656}
2657bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2658impl MavModeFlag {
2659    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2660}
2661impl Default for MavModeFlag {
2662    fn default() -> Self {
2663        Self::DEFAULT
2664    }
2665}
2666#[cfg_attr(feature = "ts", derive(TS))]
2667#[cfg_attr(feature = "ts", ts(export))]
2668#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2670#[cfg_attr(feature = "serde", serde(tag = "type"))]
2671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2672#[repr(u32)]
2673#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2674pub enum MavModeFlagDecodePosition {
2675    #[doc = "First bit:  10000000"]
2676    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2677    #[doc = "Second bit: 01000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2679    #[doc = "Third bit:  00100000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2681    #[doc = "Fourth bit: 00010000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2683    #[doc = "Fifth bit:  00001000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2685    #[doc = "Sixth bit:   00000100"]
2686    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2687    #[doc = "Seventh bit: 00000010"]
2688    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2689    #[doc = "Eighth bit: 00000001"]
2690    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2691}
2692impl MavModeFlagDecodePosition {
2693    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2694}
2695impl Default for MavModeFlagDecodePosition {
2696    fn default() -> Self {
2697        Self::DEFAULT
2698    }
2699}
2700bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2701impl MavModeProperty {
2702    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2703}
2704impl Default for MavModeProperty {
2705    fn default() -> Self {
2706        Self::DEFAULT
2707    }
2708}
2709#[cfg_attr(feature = "ts", derive(TS))]
2710#[cfg_attr(feature = "ts", ts(export))]
2711#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2713#[cfg_attr(feature = "serde", serde(tag = "type"))]
2714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2715#[repr(u32)]
2716#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2717#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2718pub enum MavMountMode {
2719    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2720    MAV_MOUNT_MODE_RETRACT = 0,
2721    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2722    MAV_MOUNT_MODE_NEUTRAL = 1,
2723    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2724    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2725    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_RC_TARGETING = 3,
2727    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2728    MAV_MOUNT_MODE_GPS_POINT = 4,
2729    #[doc = "Gimbal tracks system with specified system ID"]
2730    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2731    #[doc = "Gimbal tracks home position"]
2732    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2733}
2734impl MavMountMode {
2735    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2736}
2737impl Default for MavMountMode {
2738    fn default() -> Self {
2739        Self::DEFAULT
2740    }
2741}
2742#[cfg_attr(feature = "ts", derive(TS))]
2743#[cfg_attr(feature = "ts", ts(export))]
2744#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2746#[cfg_attr(feature = "serde", serde(tag = "type"))]
2747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2748#[repr(u32)]
2749pub enum MavOdidArmStatus {
2750    #[doc = "Passing arming checks."]
2751    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2752    #[doc = "Generic arming failure, see error string for details."]
2753    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2754}
2755impl MavOdidArmStatus {
2756    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2757}
2758impl Default for MavOdidArmStatus {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[cfg_attr(feature = "ts", derive(TS))]
2764#[cfg_attr(feature = "ts", ts(export))]
2765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2767#[cfg_attr(feature = "serde", serde(tag = "type"))]
2768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2769#[repr(u32)]
2770pub enum MavOdidAuthType {
2771    #[doc = "No authentication type is specified."]
2772    MAV_ODID_AUTH_TYPE_NONE = 0,
2773    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2774    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2775    #[doc = "Signature for the Operator ID."]
2776    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2777    #[doc = "Signature for the entire message set."]
2778    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2779    #[doc = "Authentication is provided by Network Remote ID."]
2780    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2781    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2782    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2783}
2784impl MavOdidAuthType {
2785    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2786}
2787impl Default for MavOdidAuthType {
2788    fn default() -> Self {
2789        Self::DEFAULT
2790    }
2791}
2792#[cfg_attr(feature = "ts", derive(TS))]
2793#[cfg_attr(feature = "ts", ts(export))]
2794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2796#[cfg_attr(feature = "serde", serde(tag = "type"))]
2797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2798#[repr(u32)]
2799pub enum MavOdidCategoryEu {
2800    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2801    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2802    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2803    MAV_ODID_CATEGORY_EU_OPEN = 1,
2804    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2805    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2806    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2807    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2808}
2809impl MavOdidCategoryEu {
2810    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2811}
2812impl Default for MavOdidCategoryEu {
2813    fn default() -> Self {
2814        Self::DEFAULT
2815    }
2816}
2817#[cfg_attr(feature = "ts", derive(TS))]
2818#[cfg_attr(feature = "ts", ts(export))]
2819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2821#[cfg_attr(feature = "serde", serde(tag = "type"))]
2822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2823#[repr(u32)]
2824pub enum MavOdidClassEu {
2825    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2826    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2827    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2828    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2830    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2832    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2834    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2836    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2838    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2840    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2841}
2842impl MavOdidClassEu {
2843    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2844}
2845impl Default for MavOdidClassEu {
2846    fn default() -> Self {
2847        Self::DEFAULT
2848    }
2849}
2850#[cfg_attr(feature = "ts", derive(TS))]
2851#[cfg_attr(feature = "ts", ts(export))]
2852#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2854#[cfg_attr(feature = "serde", serde(tag = "type"))]
2855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2856#[repr(u32)]
2857pub enum MavOdidClassificationType {
2858    #[doc = "The classification type for the UA is undeclared."]
2859    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2860    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2861    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2862}
2863impl MavOdidClassificationType {
2864    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2865}
2866impl Default for MavOdidClassificationType {
2867    fn default() -> Self {
2868        Self::DEFAULT
2869    }
2870}
2871#[cfg_attr(feature = "ts", derive(TS))]
2872#[cfg_attr(feature = "ts", ts(export))]
2873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2875#[cfg_attr(feature = "serde", serde(tag = "type"))]
2876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2877#[repr(u32)]
2878pub enum MavOdidDescType {
2879    #[doc = "Optional free-form text description of the purpose of the flight."]
2880    MAV_ODID_DESC_TYPE_TEXT = 0,
2881    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2882    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2883    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2885}
2886impl MavOdidDescType {
2887    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2888}
2889impl Default for MavOdidDescType {
2890    fn default() -> Self {
2891        Self::DEFAULT
2892    }
2893}
2894#[cfg_attr(feature = "ts", derive(TS))]
2895#[cfg_attr(feature = "ts", ts(export))]
2896#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2898#[cfg_attr(feature = "serde", serde(tag = "type"))]
2899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2900#[repr(u32)]
2901pub enum MavOdidHeightRef {
2902    #[doc = "The height field is relative to the take-off location."]
2903    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2904    #[doc = "The height field is relative to ground."]
2905    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2906}
2907impl MavOdidHeightRef {
2908    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2909}
2910impl Default for MavOdidHeightRef {
2911    fn default() -> Self {
2912        Self::DEFAULT
2913    }
2914}
2915#[cfg_attr(feature = "ts", derive(TS))]
2916#[cfg_attr(feature = "ts", ts(export))]
2917#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2919#[cfg_attr(feature = "serde", serde(tag = "type"))]
2920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2921#[repr(u32)]
2922pub enum MavOdidHorAcc {
2923    #[doc = "The horizontal accuracy is unknown."]
2924    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2925    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2926    MAV_ODID_HOR_ACC_10NM = 1,
2927    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2928    MAV_ODID_HOR_ACC_4NM = 2,
2929    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2930    MAV_ODID_HOR_ACC_2NM = 3,
2931    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2932    MAV_ODID_HOR_ACC_1NM = 4,
2933    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2934    MAV_ODID_HOR_ACC_0_5NM = 5,
2935    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2936    MAV_ODID_HOR_ACC_0_3NM = 6,
2937    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2938    MAV_ODID_HOR_ACC_0_1NM = 7,
2939    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2940    MAV_ODID_HOR_ACC_0_05NM = 8,
2941    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2942    MAV_ODID_HOR_ACC_30_METER = 9,
2943    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2944    MAV_ODID_HOR_ACC_10_METER = 10,
2945    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2946    MAV_ODID_HOR_ACC_3_METER = 11,
2947    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2948    MAV_ODID_HOR_ACC_1_METER = 12,
2949}
2950impl MavOdidHorAcc {
2951    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2952}
2953impl Default for MavOdidHorAcc {
2954    fn default() -> Self {
2955        Self::DEFAULT
2956    }
2957}
2958#[cfg_attr(feature = "ts", derive(TS))]
2959#[cfg_attr(feature = "ts", ts(export))]
2960#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2962#[cfg_attr(feature = "serde", serde(tag = "type"))]
2963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2964#[repr(u32)]
2965pub enum MavOdidIdType {
2966    #[doc = "No type defined."]
2967    MAV_ODID_ID_TYPE_NONE = 0,
2968    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2969    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2970    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2971    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2972    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2973    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2974    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2975    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2976}
2977impl MavOdidIdType {
2978    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2979}
2980impl Default for MavOdidIdType {
2981    fn default() -> Self {
2982        Self::DEFAULT
2983    }
2984}
2985#[cfg_attr(feature = "ts", derive(TS))]
2986#[cfg_attr(feature = "ts", ts(export))]
2987#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2989#[cfg_attr(feature = "serde", serde(tag = "type"))]
2990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2991#[repr(u32)]
2992pub enum MavOdidOperatorIdType {
2993    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2994    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2995}
2996impl MavOdidOperatorIdType {
2997    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2998}
2999impl Default for MavOdidOperatorIdType {
3000    fn default() -> Self {
3001        Self::DEFAULT
3002    }
3003}
3004#[cfg_attr(feature = "ts", derive(TS))]
3005#[cfg_attr(feature = "ts", ts(export))]
3006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3008#[cfg_attr(feature = "serde", serde(tag = "type"))]
3009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3010#[repr(u32)]
3011pub enum MavOdidOperatorLocationType {
3012    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3013    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3014    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3016    #[doc = "The location/altitude of the operator are fixed values."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3018}
3019impl MavOdidOperatorLocationType {
3020    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3021}
3022impl Default for MavOdidOperatorLocationType {
3023    fn default() -> Self {
3024        Self::DEFAULT
3025    }
3026}
3027#[cfg_attr(feature = "ts", derive(TS))]
3028#[cfg_attr(feature = "ts", ts(export))]
3029#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3031#[cfg_attr(feature = "serde", serde(tag = "type"))]
3032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3033#[repr(u32)]
3034pub enum MavOdidSpeedAcc {
3035    #[doc = "The speed accuracy is unknown."]
3036    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3037    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3038    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3039    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3040    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3041    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3042    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3043    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3044    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3045}
3046impl MavOdidSpeedAcc {
3047    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3048}
3049impl Default for MavOdidSpeedAcc {
3050    fn default() -> Self {
3051        Self::DEFAULT
3052    }
3053}
3054#[cfg_attr(feature = "ts", derive(TS))]
3055#[cfg_attr(feature = "ts", ts(export))]
3056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3058#[cfg_attr(feature = "serde", serde(tag = "type"))]
3059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3060#[repr(u32)]
3061pub enum MavOdidStatus {
3062    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3063    MAV_ODID_STATUS_UNDECLARED = 0,
3064    #[doc = "The UA is on the ground."]
3065    MAV_ODID_STATUS_GROUND = 1,
3066    #[doc = "The UA is in the air."]
3067    MAV_ODID_STATUS_AIRBORNE = 2,
3068    #[doc = "The UA is having an emergency."]
3069    MAV_ODID_STATUS_EMERGENCY = 3,
3070    #[doc = "The remote ID system is failing or unreliable in some way."]
3071    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3072}
3073impl MavOdidStatus {
3074    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3075}
3076impl Default for MavOdidStatus {
3077    fn default() -> Self {
3078        Self::DEFAULT
3079    }
3080}
3081#[cfg_attr(feature = "ts", derive(TS))]
3082#[cfg_attr(feature = "ts", ts(export))]
3083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3085#[cfg_attr(feature = "serde", serde(tag = "type"))]
3086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3087#[repr(u32)]
3088pub enum MavOdidTimeAcc {
3089    #[doc = "The timestamp accuracy is unknown."]
3090    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3091    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3092    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3094    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3096    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3098    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3100    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3102    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3104    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3106    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3108    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3110    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3112    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3114    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3116    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3118    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3120    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3121}
3122impl MavOdidTimeAcc {
3123    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3124}
3125impl Default for MavOdidTimeAcc {
3126    fn default() -> Self {
3127        Self::DEFAULT
3128    }
3129}
3130#[cfg_attr(feature = "ts", derive(TS))]
3131#[cfg_attr(feature = "ts", ts(export))]
3132#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3134#[cfg_attr(feature = "serde", serde(tag = "type"))]
3135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3136#[repr(u32)]
3137pub enum MavOdidUaType {
3138    #[doc = "No UA (Unmanned Aircraft) type defined."]
3139    MAV_ODID_UA_TYPE_NONE = 0,
3140    #[doc = "Aeroplane/Airplane. Fixed wing."]
3141    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3142    #[doc = "Helicopter or multirotor."]
3143    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3144    #[doc = "Gyroplane."]
3145    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3146    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3147    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3148    #[doc = "Ornithopter."]
3149    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3150    #[doc = "Glider."]
3151    MAV_ODID_UA_TYPE_GLIDER = 6,
3152    #[doc = "Kite."]
3153    MAV_ODID_UA_TYPE_KITE = 7,
3154    #[doc = "Free Balloon."]
3155    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3156    #[doc = "Captive Balloon."]
3157    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3158    #[doc = "Airship. E.g. a blimp."]
3159    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3160    #[doc = "Free Fall/Parachute (unpowered)."]
3161    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3162    #[doc = "Rocket."]
3163    MAV_ODID_UA_TYPE_ROCKET = 12,
3164    #[doc = "Tethered powered aircraft."]
3165    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3166    #[doc = "Ground Obstacle."]
3167    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3168    #[doc = "Other type of aircraft not listed earlier."]
3169    MAV_ODID_UA_TYPE_OTHER = 15,
3170}
3171impl MavOdidUaType {
3172    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3173}
3174impl Default for MavOdidUaType {
3175    fn default() -> Self {
3176        Self::DEFAULT
3177    }
3178}
3179#[cfg_attr(feature = "ts", derive(TS))]
3180#[cfg_attr(feature = "ts", ts(export))]
3181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3183#[cfg_attr(feature = "serde", serde(tag = "type"))]
3184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3185#[repr(u32)]
3186pub enum MavOdidVerAcc {
3187    #[doc = "The vertical accuracy is unknown."]
3188    MAV_ODID_VER_ACC_UNKNOWN = 0,
3189    #[doc = "The vertical accuracy is smaller than 150 meter."]
3190    MAV_ODID_VER_ACC_150_METER = 1,
3191    #[doc = "The vertical accuracy is smaller than 45 meter."]
3192    MAV_ODID_VER_ACC_45_METER = 2,
3193    #[doc = "The vertical accuracy is smaller than 25 meter."]
3194    MAV_ODID_VER_ACC_25_METER = 3,
3195    #[doc = "The vertical accuracy is smaller than 10 meter."]
3196    MAV_ODID_VER_ACC_10_METER = 4,
3197    #[doc = "The vertical accuracy is smaller than 3 meter."]
3198    MAV_ODID_VER_ACC_3_METER = 5,
3199    #[doc = "The vertical accuracy is smaller than 1 meter."]
3200    MAV_ODID_VER_ACC_1_METER = 6,
3201}
3202impl MavOdidVerAcc {
3203    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3204}
3205impl Default for MavOdidVerAcc {
3206    fn default() -> Self {
3207        Self::DEFAULT
3208    }
3209}
3210#[cfg_attr(feature = "ts", derive(TS))]
3211#[cfg_attr(feature = "ts", ts(export))]
3212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3214#[cfg_attr(feature = "serde", serde(tag = "type"))]
3215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3216#[repr(u32)]
3217#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3218pub enum MavParamExtType {
3219    #[doc = "8-bit unsigned integer"]
3220    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3221    #[doc = "8-bit signed integer"]
3222    MAV_PARAM_EXT_TYPE_INT8 = 2,
3223    #[doc = "16-bit unsigned integer"]
3224    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3225    #[doc = "16-bit signed integer"]
3226    MAV_PARAM_EXT_TYPE_INT16 = 4,
3227    #[doc = "32-bit unsigned integer"]
3228    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3229    #[doc = "32-bit signed integer"]
3230    MAV_PARAM_EXT_TYPE_INT32 = 6,
3231    #[doc = "64-bit unsigned integer"]
3232    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3233    #[doc = "64-bit signed integer"]
3234    MAV_PARAM_EXT_TYPE_INT64 = 8,
3235    #[doc = "32-bit floating-point"]
3236    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3237    #[doc = "64-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3239    #[doc = "Custom Type"]
3240    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3241}
3242impl MavParamExtType {
3243    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3244}
3245impl Default for MavParamExtType {
3246    fn default() -> Self {
3247        Self::DEFAULT
3248    }
3249}
3250#[cfg_attr(feature = "ts", derive(TS))]
3251#[cfg_attr(feature = "ts", ts(export))]
3252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3254#[cfg_attr(feature = "serde", serde(tag = "type"))]
3255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3256#[repr(u32)]
3257#[doc = "Specifies the datatype of a MAVLink parameter."]
3258pub enum MavParamType {
3259    #[doc = "8-bit unsigned integer"]
3260    MAV_PARAM_TYPE_UINT8 = 1,
3261    #[doc = "8-bit signed integer"]
3262    MAV_PARAM_TYPE_INT8 = 2,
3263    #[doc = "16-bit unsigned integer"]
3264    MAV_PARAM_TYPE_UINT16 = 3,
3265    #[doc = "16-bit signed integer"]
3266    MAV_PARAM_TYPE_INT16 = 4,
3267    #[doc = "32-bit unsigned integer"]
3268    MAV_PARAM_TYPE_UINT32 = 5,
3269    #[doc = "32-bit signed integer"]
3270    MAV_PARAM_TYPE_INT32 = 6,
3271    #[doc = "64-bit unsigned integer"]
3272    MAV_PARAM_TYPE_UINT64 = 7,
3273    #[doc = "64-bit signed integer"]
3274    MAV_PARAM_TYPE_INT64 = 8,
3275    #[doc = "32-bit floating-point"]
3276    MAV_PARAM_TYPE_REAL32 = 9,
3277    #[doc = "64-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL64 = 10,
3279}
3280impl MavParamType {
3281    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3282}
3283impl Default for MavParamType {
3284    fn default() -> Self {
3285        Self::DEFAULT
3286    }
3287}
3288bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3289impl MavPowerStatus {
3290    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3291}
3292impl Default for MavPowerStatus {
3293    fn default() -> Self {
3294        Self::DEFAULT
3295    }
3296}
3297bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3298impl MavProtocolCapability {
3299    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3300}
3301impl Default for MavProtocolCapability {
3302    fn default() -> Self {
3303        Self::DEFAULT
3304    }
3305}
3306#[cfg_attr(feature = "ts", derive(TS))]
3307#[cfg_attr(feature = "ts", ts(export))]
3308#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3310#[cfg_attr(feature = "serde", serde(tag = "type"))]
3311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3312#[repr(u32)]
3313#[doc = "Result from a MAVLink command (MAV_CMD)"]
3314pub enum MavResult {
3315    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3316    MAV_RESULT_ACCEPTED = 0,
3317    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3318    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3319    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3320    MAV_RESULT_DENIED = 2,
3321    #[doc = "Command is not supported (unknown)."]
3322    MAV_RESULT_UNSUPPORTED = 3,
3323    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3324    MAV_RESULT_FAILED = 4,
3325    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3326    MAV_RESULT_IN_PROGRESS = 5,
3327    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3328    MAV_RESULT_CANCELLED = 6,
3329    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3330    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3331    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3332    MAV_RESULT_COMMAND_INT_ONLY = 8,
3333    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3334    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3335}
3336impl MavResult {
3337    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3338}
3339impl Default for MavResult {
3340    fn default() -> Self {
3341        Self::DEFAULT
3342    }
3343}
3344#[cfg_attr(feature = "ts", derive(TS))]
3345#[cfg_attr(feature = "ts", ts(export))]
3346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3348#[cfg_attr(feature = "serde", serde(tag = "type"))]
3349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3350#[repr(u32)]
3351#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3352#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3353pub enum MavRoi {
3354    #[doc = "No region of interest."]
3355    MAV_ROI_NONE = 0,
3356    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3357    MAV_ROI_WPNEXT = 1,
3358    #[doc = "Point toward given waypoint."]
3359    MAV_ROI_WPINDEX = 2,
3360    #[doc = "Point toward fixed location."]
3361    MAV_ROI_LOCATION = 3,
3362    #[doc = "Point toward of given id."]
3363    MAV_ROI_TARGET = 4,
3364}
3365impl MavRoi {
3366    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3367}
3368impl Default for MavRoi {
3369    fn default() -> Self {
3370        Self::DEFAULT
3371    }
3372}
3373#[cfg_attr(feature = "ts", derive(TS))]
3374#[cfg_attr(feature = "ts", ts(export))]
3375#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3377#[cfg_attr(feature = "serde", serde(tag = "type"))]
3378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3379#[repr(u32)]
3380#[doc = "Enumeration of sensor orientation, according to its rotations"]
3381pub enum MavSensorOrientation {
3382    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3383    MAV_SENSOR_ROTATION_NONE = 0,
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3385    MAV_SENSOR_ROTATION_YAW_45 = 1,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3387    MAV_SENSOR_ROTATION_YAW_90 = 2,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3389    MAV_SENSOR_ROTATION_YAW_135 = 3,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3391    MAV_SENSOR_ROTATION_YAW_180 = 4,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3393    MAV_SENSOR_ROTATION_YAW_225 = 5,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3395    MAV_SENSOR_ROTATION_YAW_270 = 6,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3397    MAV_SENSOR_ROTATION_YAW_315 = 7,
3398    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3399    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3401    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3406    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3407    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3408    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3409    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3414    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3415    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3417    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3422    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3423    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3425    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3430    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3431    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3432    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3434    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3435    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3438    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3439    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3440    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3442    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3444    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3446    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3448    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3450    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3452    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3454    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3455    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3456    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3457    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3458    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3459    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3460    #[doc = "Pitch: 315"]
3461    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3462    #[doc = "Roll: 90, Pitch: 315"]
3463    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3464    #[doc = "Custom orientation"]
3465    MAV_SENSOR_ROTATION_CUSTOM = 100,
3466}
3467impl MavSensorOrientation {
3468    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3469}
3470impl Default for MavSensorOrientation {
3471    fn default() -> Self {
3472        Self::DEFAULT
3473    }
3474}
3475#[cfg_attr(feature = "ts", derive(TS))]
3476#[cfg_attr(feature = "ts", ts(export))]
3477#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3479#[cfg_attr(feature = "serde", serde(tag = "type"))]
3480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3481#[repr(u32)]
3482#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3483pub enum MavSeverity {
3484    #[doc = "System is unusable. This is a \"panic\" condition."]
3485    MAV_SEVERITY_EMERGENCY = 0,
3486    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3487    MAV_SEVERITY_ALERT = 1,
3488    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3489    MAV_SEVERITY_CRITICAL = 2,
3490    #[doc = "Indicates an error in secondary/redundant systems."]
3491    MAV_SEVERITY_ERROR = 3,
3492    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3493    MAV_SEVERITY_WARNING = 4,
3494    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3495    MAV_SEVERITY_NOTICE = 5,
3496    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3497    MAV_SEVERITY_INFO = 6,
3498    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3499    MAV_SEVERITY_DEBUG = 7,
3500}
3501impl MavSeverity {
3502    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3503}
3504impl Default for MavSeverity {
3505    fn default() -> Self {
3506        Self::DEFAULT
3507    }
3508}
3509#[cfg_attr(feature = "ts", derive(TS))]
3510#[cfg_attr(feature = "ts", ts(export))]
3511#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3513#[cfg_attr(feature = "serde", serde(tag = "type"))]
3514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3515#[repr(u32)]
3516#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3517pub enum MavStandardMode {
3518    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3519    MAV_STANDARD_MODE_NON_STANDARD = 0,
3520    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3521    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3522    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_ORBIT = 2,
3524    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_CRUISE = 3,
3526    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3528    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3529    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3530    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3531    MAV_STANDARD_MODE_MISSION = 6,
3532    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3533    MAV_STANDARD_MODE_LAND = 7,
3534    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_TAKEOFF = 8,
3536}
3537impl MavStandardMode {
3538    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3539}
3540impl Default for MavStandardMode {
3541    fn default() -> Self {
3542        Self::DEFAULT
3543    }
3544}
3545#[cfg_attr(feature = "ts", derive(TS))]
3546#[cfg_attr(feature = "ts", ts(export))]
3547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3549#[cfg_attr(feature = "serde", serde(tag = "type"))]
3550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3551#[repr(u32)]
3552pub enum MavState {
3553    #[doc = "Uninitialized system, state is unknown."]
3554    MAV_STATE_UNINIT = 0,
3555    #[doc = "System is booting up."]
3556    MAV_STATE_BOOT = 1,
3557    #[doc = "System is calibrating and not flight-ready."]
3558    MAV_STATE_CALIBRATING = 2,
3559    #[doc = "System is grounded and on standby. It can be launched any time."]
3560    MAV_STATE_STANDBY = 3,
3561    #[doc = "System is active and might be already airborne. Motors are engaged."]
3562    MAV_STATE_ACTIVE = 4,
3563    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3564    MAV_STATE_CRITICAL = 5,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3566    MAV_STATE_EMERGENCY = 6,
3567    #[doc = "System just initialized its power-down sequence, will shut down now."]
3568    MAV_STATE_POWEROFF = 7,
3569    #[doc = "System is terminating itself (failsafe or commanded)."]
3570    MAV_STATE_FLIGHT_TERMINATION = 8,
3571}
3572impl MavState {
3573    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3574}
3575impl Default for MavState {
3576    fn default() -> Self {
3577        Self::DEFAULT
3578    }
3579}
3580bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3581impl MavSysStatusSensor {
3582    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3583}
3584impl Default for MavSysStatusSensor {
3585    fn default() -> Self {
3586        Self::DEFAULT
3587    }
3588}
3589bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3590impl MavSysStatusSensorExtended {
3591    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3592}
3593impl Default for MavSysStatusSensorExtended {
3594    fn default() -> Self {
3595        Self::DEFAULT
3596    }
3597}
3598#[cfg_attr(feature = "ts", derive(TS))]
3599#[cfg_attr(feature = "ts", ts(export))]
3600#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3602#[cfg_attr(feature = "serde", serde(tag = "type"))]
3603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3604#[repr(u32)]
3605pub enum MavTunnelPayloadType {
3606    #[doc = "Encoding of payload unknown."]
3607    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3608    #[doc = "Registered for STorM32 gimbal controller."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3628    #[doc = "Registered for ModalAI remote OSD protocol."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3630    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3632    #[doc = "Registered for ModalAI vendor use."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3634}
3635impl MavTunnelPayloadType {
3636    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3637}
3638impl Default for MavTunnelPayloadType {
3639    fn default() -> Self {
3640        Self::DEFAULT
3641    }
3642}
3643#[cfg_attr(feature = "ts", derive(TS))]
3644#[cfg_attr(feature = "ts", ts(export))]
3645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3647#[cfg_attr(feature = "serde", serde(tag = "type"))]
3648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3649#[repr(u32)]
3650#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3651pub enum MavType {
3652    #[doc = "Generic micro air vehicle"]
3653    MAV_TYPE_GENERIC = 0,
3654    #[doc = "Fixed wing aircraft."]
3655    MAV_TYPE_FIXED_WING = 1,
3656    #[doc = "Quadrotor"]
3657    MAV_TYPE_QUADROTOR = 2,
3658    #[doc = "Coaxial helicopter"]
3659    MAV_TYPE_COAXIAL = 3,
3660    #[doc = "Normal helicopter with tail rotor."]
3661    MAV_TYPE_HELICOPTER = 4,
3662    #[doc = "Ground installation"]
3663    MAV_TYPE_ANTENNA_TRACKER = 5,
3664    #[doc = "Operator control unit / ground control station"]
3665    MAV_TYPE_GCS = 6,
3666    #[doc = "Airship, controlled"]
3667    MAV_TYPE_AIRSHIP = 7,
3668    #[doc = "Free balloon, uncontrolled"]
3669    MAV_TYPE_FREE_BALLOON = 8,
3670    #[doc = "Rocket"]
3671    MAV_TYPE_ROCKET = 9,
3672    #[doc = "Ground rover"]
3673    MAV_TYPE_GROUND_ROVER = 10,
3674    #[doc = "Surface vessel, boat, ship"]
3675    MAV_TYPE_SURFACE_BOAT = 11,
3676    #[doc = "Submarine"]
3677    MAV_TYPE_SUBMARINE = 12,
3678    #[doc = "Hexarotor"]
3679    MAV_TYPE_HEXAROTOR = 13,
3680    #[doc = "Octorotor"]
3681    MAV_TYPE_OCTOROTOR = 14,
3682    #[doc = "Tricopter"]
3683    MAV_TYPE_TRICOPTER = 15,
3684    #[doc = "Flapping wing"]
3685    MAV_TYPE_FLAPPING_WING = 16,
3686    #[doc = "Kite"]
3687    MAV_TYPE_KITE = 17,
3688    #[doc = "Onboard companion controller"]
3689    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3690    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3691    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3692    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3694    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3695    MAV_TYPE_VTOL_TILTROTOR = 21,
3696    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3697    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3698    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3699    MAV_TYPE_VTOL_TAILSITTER = 23,
3700    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3701    MAV_TYPE_VTOL_TILTWING = 24,
3702    #[doc = "VTOL reserved 5"]
3703    MAV_TYPE_VTOL_RESERVED5 = 25,
3704    #[doc = "Gimbal"]
3705    MAV_TYPE_GIMBAL = 26,
3706    #[doc = "ADSB system"]
3707    MAV_TYPE_ADSB = 27,
3708    #[doc = "Steerable, nonrigid airfoil"]
3709    MAV_TYPE_PARAFOIL = 28,
3710    #[doc = "Dodecarotor"]
3711    MAV_TYPE_DODECAROTOR = 29,
3712    #[doc = "Camera"]
3713    MAV_TYPE_CAMERA = 30,
3714    #[doc = "Charging station"]
3715    MAV_TYPE_CHARGING_STATION = 31,
3716    #[doc = "FLARM collision avoidance system"]
3717    MAV_TYPE_FLARM = 32,
3718    #[doc = "Servo"]
3719    MAV_TYPE_SERVO = 33,
3720    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3721    MAV_TYPE_ODID = 34,
3722    #[doc = "Decarotor"]
3723    MAV_TYPE_DECAROTOR = 35,
3724    #[doc = "Battery"]
3725    MAV_TYPE_BATTERY = 36,
3726    #[doc = "Parachute"]
3727    MAV_TYPE_PARACHUTE = 37,
3728    #[doc = "Log"]
3729    MAV_TYPE_LOG = 38,
3730    #[doc = "OSD"]
3731    MAV_TYPE_OSD = 39,
3732    #[doc = "IMU"]
3733    MAV_TYPE_IMU = 40,
3734    #[doc = "GPS"]
3735    MAV_TYPE_GPS = 41,
3736    #[doc = "Winch"]
3737    MAV_TYPE_WINCH = 42,
3738    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3739    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3740    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3741    MAV_TYPE_ILLUMINATOR = 44,
3742    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3743    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3744}
3745impl MavType {
3746    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3747}
3748impl Default for MavType {
3749    fn default() -> Self {
3750        Self::DEFAULT
3751    }
3752}
3753#[cfg_attr(feature = "ts", derive(TS))]
3754#[cfg_attr(feature = "ts", ts(export))]
3755#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3757#[cfg_attr(feature = "serde", serde(tag = "type"))]
3758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3759#[repr(u32)]
3760#[doc = "Enumeration of VTOL states"]
3761pub enum MavVtolState {
3762    #[doc = "MAV is not configured as VTOL"]
3763    MAV_VTOL_STATE_UNDEFINED = 0,
3764    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3765    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3766    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3767    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3768    #[doc = "VTOL is in multicopter state"]
3769    MAV_VTOL_STATE_MC = 3,
3770    #[doc = "VTOL is in fixed-wing state"]
3771    MAV_VTOL_STATE_FW = 4,
3772}
3773impl MavVtolState {
3774    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3775}
3776impl Default for MavVtolState {
3777    fn default() -> Self {
3778        Self::DEFAULT
3779    }
3780}
3781bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3782impl MavWinchStatusFlag {
3783    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3784}
3785impl Default for MavWinchStatusFlag {
3786    fn default() -> Self {
3787        Self::DEFAULT
3788    }
3789}
3790#[cfg_attr(feature = "ts", derive(TS))]
3791#[cfg_attr(feature = "ts", ts(export))]
3792#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3794#[cfg_attr(feature = "serde", serde(tag = "type"))]
3795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3796#[repr(u32)]
3797pub enum MavlinkDataStreamType {
3798    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3799    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3800    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3801    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3802    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3803    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3804}
3805impl MavlinkDataStreamType {
3806    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3807}
3808impl Default for MavlinkDataStreamType {
3809    fn default() -> Self {
3810        Self::DEFAULT
3811    }
3812}
3813#[cfg_attr(feature = "ts", derive(TS))]
3814#[cfg_attr(feature = "ts", ts(export))]
3815#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3817#[cfg_attr(feature = "serde", serde(tag = "type"))]
3818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3819#[repr(u32)]
3820#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3821pub enum MissionState {
3822    #[doc = "The mission status reporting is not supported."]
3823    MISSION_STATE_UNKNOWN = 0,
3824    #[doc = "No mission on the vehicle."]
3825    MISSION_STATE_NO_MISSION = 1,
3826    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3827    MISSION_STATE_NOT_STARTED = 2,
3828    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3829    MISSION_STATE_ACTIVE = 3,
3830    #[doc = "Mission is paused when in auto mode."]
3831    MISSION_STATE_PAUSED = 4,
3832    #[doc = "Mission has executed all mission items."]
3833    MISSION_STATE_COMPLETE = 5,
3834}
3835impl MissionState {
3836    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3837}
3838impl Default for MissionState {
3839    fn default() -> Self {
3840        Self::DEFAULT
3841    }
3842}
3843#[cfg_attr(feature = "ts", derive(TS))]
3844#[cfg_attr(feature = "ts", ts(export))]
3845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3847#[cfg_attr(feature = "serde", serde(tag = "type"))]
3848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3849#[repr(u32)]
3850#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3851pub enum MotorTestOrder {
3852    #[doc = "Default autopilot motor test method."]
3853    MOTOR_TEST_ORDER_DEFAULT = 0,
3854    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3855    MOTOR_TEST_ORDER_SEQUENCE = 1,
3856    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3857    MOTOR_TEST_ORDER_BOARD = 2,
3858}
3859impl MotorTestOrder {
3860    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3861}
3862impl Default for MotorTestOrder {
3863    fn default() -> Self {
3864        Self::DEFAULT
3865    }
3866}
3867#[cfg_attr(feature = "ts", derive(TS))]
3868#[cfg_attr(feature = "ts", ts(export))]
3869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3871#[cfg_attr(feature = "serde", serde(tag = "type"))]
3872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3873#[repr(u32)]
3874#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3875pub enum MotorTestThrottleType {
3876    #[doc = "Throttle as a percentage (0 ~ 100)"]
3877    MOTOR_TEST_THROTTLE_PERCENT = 0,
3878    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3879    MOTOR_TEST_THROTTLE_PWM = 1,
3880    #[doc = "Throttle pass-through from pilot's transmitter."]
3881    MOTOR_TEST_THROTTLE_PILOT = 2,
3882    #[doc = "Per-motor compass calibration test."]
3883    MOTOR_TEST_COMPASS_CAL = 3,
3884}
3885impl MotorTestThrottleType {
3886    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3887}
3888impl Default for MotorTestThrottleType {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893#[cfg_attr(feature = "ts", derive(TS))]
3894#[cfg_attr(feature = "ts", ts(export))]
3895#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3897#[cfg_attr(feature = "serde", serde(tag = "type"))]
3898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3899#[repr(u32)]
3900pub enum NavVtolLandOptions {
3901    #[doc = "Default autopilot landing behaviour."]
3902    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3903    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3904    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3905    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3906    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3907}
3908impl NavVtolLandOptions {
3909    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3910}
3911impl Default for NavVtolLandOptions {
3912    fn default() -> Self {
3913        Self::DEFAULT
3914    }
3915}
3916#[cfg_attr(feature = "ts", derive(TS))]
3917#[cfg_attr(feature = "ts", ts(export))]
3918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3920#[cfg_attr(feature = "serde", serde(tag = "type"))]
3921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3922#[repr(u32)]
3923#[doc = "Yaw behaviour during orbit flight."]
3924pub enum OrbitYawBehaviour {
3925    #[doc = "Vehicle front points to the center (default)."]
3926    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3927    #[doc = "Vehicle front holds heading when message received."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3929    #[doc = "Yaw uncontrolled."]
3930    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3931    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3932    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3933    #[doc = "Yaw controlled by RC input."]
3934    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3935    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3936    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3937}
3938impl OrbitYawBehaviour {
3939    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3940}
3941impl Default for OrbitYawBehaviour {
3942    fn default() -> Self {
3943        Self::DEFAULT
3944    }
3945}
3946#[cfg_attr(feature = "ts", derive(TS))]
3947#[cfg_attr(feature = "ts", ts(export))]
3948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3950#[cfg_attr(feature = "serde", serde(tag = "type"))]
3951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3952#[repr(u32)]
3953#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3954pub enum ParachuteAction {
3955    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3956    PARACHUTE_DISABLE = 0,
3957    #[doc = "Enable auto-release of parachute."]
3958    PARACHUTE_ENABLE = 1,
3959    #[doc = "Release parachute and kill motors."]
3960    PARACHUTE_RELEASE = 2,
3961}
3962impl ParachuteAction {
3963    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3964}
3965impl Default for ParachuteAction {
3966    fn default() -> Self {
3967        Self::DEFAULT
3968    }
3969}
3970#[cfg_attr(feature = "ts", derive(TS))]
3971#[cfg_attr(feature = "ts", ts(export))]
3972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3974#[cfg_attr(feature = "serde", serde(tag = "type"))]
3975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3976#[repr(u32)]
3977#[doc = "Result from PARAM_EXT_SET message."]
3978pub enum ParamAck {
3979    #[doc = "Parameter value ACCEPTED and SET"]
3980    PARAM_ACK_ACCEPTED = 0,
3981    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3982    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3983    #[doc = "Parameter failed to set"]
3984    PARAM_ACK_FAILED = 2,
3985    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3986    PARAM_ACK_IN_PROGRESS = 3,
3987}
3988impl ParamAck {
3989    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3990}
3991impl Default for ParamAck {
3992    fn default() -> Self {
3993        Self::DEFAULT
3994    }
3995}
3996bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3997impl PositionTargetTypemask {
3998    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3999}
4000impl Default for PositionTargetTypemask {
4001    fn default() -> Self {
4002        Self::DEFAULT
4003    }
4004}
4005#[cfg_attr(feature = "ts", derive(TS))]
4006#[cfg_attr(feature = "ts", ts(export))]
4007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4009#[cfg_attr(feature = "serde", serde(tag = "type"))]
4010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4011#[repr(u32)]
4012#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4013pub enum PrecisionLandMode {
4014    #[doc = "Normal (non-precision) landing."]
4015    PRECISION_LAND_MODE_DISABLED = 0,
4016    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4017    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4018    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4019    PRECISION_LAND_MODE_REQUIRED = 2,
4020}
4021impl PrecisionLandMode {
4022    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4023}
4024impl Default for PrecisionLandMode {
4025    fn default() -> Self {
4026        Self::DEFAULT
4027    }
4028}
4029#[cfg_attr(feature = "ts", derive(TS))]
4030#[cfg_attr(feature = "ts", ts(export))]
4031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4033#[cfg_attr(feature = "serde", serde(tag = "type"))]
4034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4035#[repr(u32)]
4036#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4037pub enum PreflightStorageMissionAction {
4038    #[doc = "Read current mission data from persistent storage"]
4039    MISSION_READ_PERSISTENT = 0,
4040    #[doc = "Write current mission data to persistent storage"]
4041    MISSION_WRITE_PERSISTENT = 1,
4042    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4043    MISSION_RESET_DEFAULT = 2,
4044}
4045impl PreflightStorageMissionAction {
4046    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4047}
4048impl Default for PreflightStorageMissionAction {
4049    fn default() -> Self {
4050        Self::DEFAULT
4051    }
4052}
4053#[cfg_attr(feature = "ts", derive(TS))]
4054#[cfg_attr(feature = "ts", ts(export))]
4055#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4057#[cfg_attr(feature = "serde", serde(tag = "type"))]
4058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4059#[repr(u32)]
4060#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4061pub enum PreflightStorageParameterAction {
4062    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4063    PARAM_READ_PERSISTENT = 0,
4064    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4065    PARAM_WRITE_PERSISTENT = 1,
4066    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4067    PARAM_RESET_CONFIG_DEFAULT = 2,
4068    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4069    PARAM_RESET_SENSOR_DEFAULT = 3,
4070    #[doc = "Reset all parameters, including operation counters, to default values"]
4071    PARAM_RESET_ALL_DEFAULT = 4,
4072}
4073impl PreflightStorageParameterAction {
4074    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4075}
4076impl Default for PreflightStorageParameterAction {
4077    fn default() -> Self {
4078        Self::DEFAULT
4079    }
4080}
4081#[cfg_attr(feature = "ts", derive(TS))]
4082#[cfg_attr(feature = "ts", ts(export))]
4083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4085#[cfg_attr(feature = "serde", serde(tag = "type"))]
4086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4087#[repr(u32)]
4088#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4089pub enum RcSubType {
4090    #[doc = "Spektrum DSM2"]
4091    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4092    #[doc = "Spektrum DSMX"]
4093    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4094    #[doc = "Spektrum DSMX8"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4096}
4097impl RcSubType {
4098    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4099}
4100impl Default for RcSubType {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4113pub enum RcType {
4114    #[doc = "Spektrum"]
4115    RC_TYPE_SPEKTRUM = 0,
4116    #[doc = "CRSF"]
4117    RC_TYPE_CRSF = 1,
4118}
4119impl RcType {
4120    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4121}
4122impl Default for RcType {
4123    fn default() -> Self {
4124        Self::DEFAULT
4125    }
4126}
4127#[cfg_attr(feature = "ts", derive(TS))]
4128#[cfg_attr(feature = "ts", ts(export))]
4129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4131#[cfg_attr(feature = "serde", serde(tag = "type"))]
4132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4133#[repr(u32)]
4134#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4135pub enum RebootShutdownConditions {
4136    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4137    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4138    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4139    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4140}
4141impl RebootShutdownConditions {
4142    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4143}
4144impl Default for RebootShutdownConditions {
4145    fn default() -> Self {
4146        Self::DEFAULT
4147    }
4148}
4149#[cfg_attr(feature = "ts", derive(TS))]
4150#[cfg_attr(feature = "ts", ts(export))]
4151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4153#[cfg_attr(feature = "serde", serde(tag = "type"))]
4154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4155#[repr(u32)]
4156#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4157pub enum RtkBaselineCoordinateSystem {
4158    #[doc = "Earth-centered, Earth-fixed"]
4159    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4160    #[doc = "RTK basestation centered, north, east, down"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4162}
4163impl RtkBaselineCoordinateSystem {
4164    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4165}
4166impl Default for RtkBaselineCoordinateSystem {
4167    fn default() -> Self {
4168        Self::DEFAULT
4169    }
4170}
4171#[cfg_attr(feature = "ts", derive(TS))]
4172#[cfg_attr(feature = "ts", ts(export))]
4173#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4175#[cfg_attr(feature = "serde", serde(tag = "type"))]
4176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4177#[repr(u32)]
4178#[doc = "Possible safety switch states."]
4179pub enum SafetySwitchState {
4180    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4181    SAFETY_SWITCH_STATE_SAFE = 0,
4182    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4183    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4184}
4185impl SafetySwitchState {
4186    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4187}
4188impl Default for SafetySwitchState {
4189    fn default() -> Self {
4190        Self::DEFAULT
4191    }
4192}
4193#[cfg_attr(feature = "ts", derive(TS))]
4194#[cfg_attr(feature = "ts", ts(export))]
4195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4197#[cfg_attr(feature = "serde", serde(tag = "type"))]
4198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4199#[repr(u32)]
4200#[doc = "SERIAL_CONTROL device types"]
4201pub enum SerialControlDev {
4202    #[doc = "First telemetry port"]
4203    SERIAL_CONTROL_DEV_TELEM1 = 0,
4204    #[doc = "Second telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM2 = 1,
4206    #[doc = "First GPS port"]
4207    SERIAL_CONTROL_DEV_GPS1 = 2,
4208    #[doc = "Second GPS port"]
4209    SERIAL_CONTROL_DEV_GPS2 = 3,
4210    #[doc = "system shell"]
4211    SERIAL_CONTROL_DEV_SHELL = 10,
4212    #[doc = "SERIAL0"]
4213    SERIAL_CONTROL_SERIAL0 = 100,
4214    #[doc = "SERIAL1"]
4215    SERIAL_CONTROL_SERIAL1 = 101,
4216    #[doc = "SERIAL2"]
4217    SERIAL_CONTROL_SERIAL2 = 102,
4218    #[doc = "SERIAL3"]
4219    SERIAL_CONTROL_SERIAL3 = 103,
4220    #[doc = "SERIAL4"]
4221    SERIAL_CONTROL_SERIAL4 = 104,
4222    #[doc = "SERIAL5"]
4223    SERIAL_CONTROL_SERIAL5 = 105,
4224    #[doc = "SERIAL6"]
4225    SERIAL_CONTROL_SERIAL6 = 106,
4226    #[doc = "SERIAL7"]
4227    SERIAL_CONTROL_SERIAL7 = 107,
4228    #[doc = "SERIAL8"]
4229    SERIAL_CONTROL_SERIAL8 = 108,
4230    #[doc = "SERIAL9"]
4231    SERIAL_CONTROL_SERIAL9 = 109,
4232}
4233impl SerialControlDev {
4234    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4235}
4236impl Default for SerialControlDev {
4237    fn default() -> Self {
4238        Self::DEFAULT
4239    }
4240}
4241bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4242impl SerialControlFlag {
4243    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4244}
4245impl Default for SerialControlFlag {
4246    fn default() -> Self {
4247        Self::DEFAULT
4248    }
4249}
4250#[cfg_attr(feature = "ts", derive(TS))]
4251#[cfg_attr(feature = "ts", ts(export))]
4252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4254#[cfg_attr(feature = "serde", serde(tag = "type"))]
4255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4256#[repr(u32)]
4257#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4258pub enum SetFocusType {
4259    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4260    FOCUS_TYPE_STEP = 0,
4261    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4262    FOCUS_TYPE_CONTINUOUS = 1,
4263    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4264    FOCUS_TYPE_RANGE = 2,
4265    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4266    FOCUS_TYPE_METERS = 3,
4267    #[doc = "Focus automatically."]
4268    FOCUS_TYPE_AUTO = 4,
4269    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4270    FOCUS_TYPE_AUTO_SINGLE = 5,
4271    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4272    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4273}
4274impl SetFocusType {
4275    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4276}
4277impl Default for SetFocusType {
4278    fn default() -> Self {
4279        Self::DEFAULT
4280    }
4281}
4282#[cfg_attr(feature = "ts", derive(TS))]
4283#[cfg_attr(feature = "ts", ts(export))]
4284#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4286#[cfg_attr(feature = "serde", serde(tag = "type"))]
4287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4288#[repr(u32)]
4289#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4290pub enum SpeedType {
4291    #[doc = "Airspeed"]
4292    SPEED_TYPE_AIRSPEED = 0,
4293    #[doc = "Groundspeed"]
4294    SPEED_TYPE_GROUNDSPEED = 1,
4295    #[doc = "Climb speed"]
4296    SPEED_TYPE_CLIMB_SPEED = 2,
4297    #[doc = "Descent speed"]
4298    SPEED_TYPE_DESCENT_SPEED = 3,
4299}
4300impl SpeedType {
4301    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4302}
4303impl Default for SpeedType {
4304    fn default() -> Self {
4305        Self::DEFAULT
4306    }
4307}
4308#[cfg_attr(feature = "ts", derive(TS))]
4309#[cfg_attr(feature = "ts", ts(export))]
4310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4312#[cfg_attr(feature = "serde", serde(tag = "type"))]
4313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4314#[repr(u32)]
4315#[doc = "Flags to indicate the status of camera storage."]
4316pub enum StorageStatus {
4317    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4318    STORAGE_STATUS_EMPTY = 0,
4319    #[doc = "Storage present but unformatted."]
4320    STORAGE_STATUS_UNFORMATTED = 1,
4321    #[doc = "Storage present and ready."]
4322    STORAGE_STATUS_READY = 2,
4323    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4324    STORAGE_STATUS_NOT_SUPPORTED = 3,
4325}
4326impl StorageStatus {
4327    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4328}
4329impl Default for StorageStatus {
4330    fn default() -> Self {
4331        Self::DEFAULT
4332    }
4333}
4334#[cfg_attr(feature = "ts", derive(TS))]
4335#[cfg_attr(feature = "ts", ts(export))]
4336#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4338#[cfg_attr(feature = "serde", serde(tag = "type"))]
4339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4340#[repr(u32)]
4341#[doc = "Flags to indicate the type of storage."]
4342pub enum StorageType {
4343    #[doc = "Storage type is not known."]
4344    STORAGE_TYPE_UNKNOWN = 0,
4345    #[doc = "Storage type is USB device."]
4346    STORAGE_TYPE_USB_STICK = 1,
4347    #[doc = "Storage type is SD card."]
4348    STORAGE_TYPE_SD = 2,
4349    #[doc = "Storage type is microSD card."]
4350    STORAGE_TYPE_MICROSD = 3,
4351    #[doc = "Storage type is CFast."]
4352    STORAGE_TYPE_CF = 4,
4353    #[doc = "Storage type is CFexpress."]
4354    STORAGE_TYPE_CFE = 5,
4355    #[doc = "Storage type is XQD."]
4356    STORAGE_TYPE_XQD = 6,
4357    #[doc = "Storage type is HD mass storage type."]
4358    STORAGE_TYPE_HD = 7,
4359    #[doc = "Storage type is other, not listed type."]
4360    STORAGE_TYPE_OTHER = 254,
4361}
4362impl StorageType {
4363    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4364}
4365impl Default for StorageType {
4366    fn default() -> Self {
4367        Self::DEFAULT
4368    }
4369}
4370bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4371impl StorageUsageFlag {
4372    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4373}
4374impl Default for StorageUsageFlag {
4375    fn default() -> Self {
4376        Self::DEFAULT
4377    }
4378}
4379#[cfg_attr(feature = "ts", derive(TS))]
4380#[cfg_attr(feature = "ts", ts(export))]
4381#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4383#[cfg_attr(feature = "serde", serde(tag = "type"))]
4384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4385#[repr(u32)]
4386#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4387pub enum TuneFormat {
4388    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4389    TUNE_FORMAT_QBASIC1_1 = 1,
4390    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4391    TUNE_FORMAT_MML_MODERN = 2,
4392}
4393impl TuneFormat {
4394    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4395}
4396impl Default for TuneFormat {
4397    fn default() -> Self {
4398        Self::DEFAULT
4399    }
4400}
4401#[cfg_attr(feature = "ts", derive(TS))]
4402#[cfg_attr(feature = "ts", ts(export))]
4403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4405#[cfg_attr(feature = "serde", serde(tag = "type"))]
4406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4407#[repr(u32)]
4408#[doc = "Available autopilot modes for ualberta uav"]
4409pub enum UalbertaAutopilotMode {
4410    #[doc = "Raw input pulse widts sent to output"]
4411    MODE_MANUAL_DIRECT = 1,
4412    #[doc = "Inputs are normalized using calibration, the converted back to raw pulse widths for output"]
4413    MODE_MANUAL_SCALED = 2,
4414    MODE_AUTO_PID_ATT = 3,
4415    MODE_AUTO_PID_VEL = 4,
4416    MODE_AUTO_PID_POS = 5,
4417}
4418impl UalbertaAutopilotMode {
4419    pub const DEFAULT: Self = Self::MODE_MANUAL_DIRECT;
4420}
4421impl Default for UalbertaAutopilotMode {
4422    fn default() -> Self {
4423        Self::DEFAULT
4424    }
4425}
4426#[cfg_attr(feature = "ts", derive(TS))]
4427#[cfg_attr(feature = "ts", ts(export))]
4428#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4430#[cfg_attr(feature = "serde", serde(tag = "type"))]
4431#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4432#[repr(u32)]
4433#[doc = "Navigation filter mode"]
4434pub enum UalbertaNavMode {
4435    NAV_AHRS_INIT = 1,
4436    #[doc = "AHRS mode"]
4437    NAV_AHRS = 2,
4438    #[doc = "INS/GPS initialization mode"]
4439    NAV_INS_GPS_INIT = 3,
4440    #[doc = "INS/GPS mode"]
4441    NAV_INS_GPS = 4,
4442}
4443impl UalbertaNavMode {
4444    pub const DEFAULT: Self = Self::NAV_AHRS_INIT;
4445}
4446impl Default for UalbertaNavMode {
4447    fn default() -> Self {
4448        Self::DEFAULT
4449    }
4450}
4451#[cfg_attr(feature = "ts", derive(TS))]
4452#[cfg_attr(feature = "ts", ts(export))]
4453#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4454#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4455#[cfg_attr(feature = "serde", serde(tag = "type"))]
4456#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4457#[repr(u32)]
4458#[doc = "Mode currently commanded by pilot"]
4459pub enum UalbertaPilotMode {
4460    PILOT_MANUAL = 1,
4461    PILOT_AUTO = 2,
4462    #[doc = "Rotomotion mode"]
4463    PILOT_ROTO = 3,
4464}
4465impl UalbertaPilotMode {
4466    pub const DEFAULT: Self = Self::PILOT_MANUAL;
4467}
4468impl Default for UalbertaPilotMode {
4469    fn default() -> Self {
4470        Self::DEFAULT
4471    }
4472}
4473#[cfg_attr(feature = "ts", derive(TS))]
4474#[cfg_attr(feature = "ts", ts(export))]
4475#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4477#[cfg_attr(feature = "serde", serde(tag = "type"))]
4478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4479#[repr(u32)]
4480#[doc = "Generalized UAVCAN node health"]
4481pub enum UavcanNodeHealth {
4482    #[doc = "The node is functioning properly."]
4483    UAVCAN_NODE_HEALTH_OK = 0,
4484    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4485    UAVCAN_NODE_HEALTH_WARNING = 1,
4486    #[doc = "The node has encountered a major failure."]
4487    UAVCAN_NODE_HEALTH_ERROR = 2,
4488    #[doc = "The node has suffered a fatal malfunction."]
4489    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4490}
4491impl UavcanNodeHealth {
4492    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4493}
4494impl Default for UavcanNodeHealth {
4495    fn default() -> Self {
4496        Self::DEFAULT
4497    }
4498}
4499#[cfg_attr(feature = "ts", derive(TS))]
4500#[cfg_attr(feature = "ts", ts(export))]
4501#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4503#[cfg_attr(feature = "serde", serde(tag = "type"))]
4504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4505#[repr(u32)]
4506#[doc = "Generalized UAVCAN node mode"]
4507pub enum UavcanNodeMode {
4508    #[doc = "The node is performing its primary functions."]
4509    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4510    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4511    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4512    #[doc = "The node is under maintenance."]
4513    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4514    #[doc = "The node is in the process of updating its software."]
4515    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4516    #[doc = "The node is no longer available online."]
4517    UAVCAN_NODE_MODE_OFFLINE = 7,
4518}
4519impl UavcanNodeMode {
4520    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4521}
4522impl Default for UavcanNodeMode {
4523    fn default() -> Self {
4524        Self::DEFAULT
4525    }
4526}
4527bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4528impl UtmDataAvailFlags {
4529    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4530}
4531impl Default for UtmDataAvailFlags {
4532    fn default() -> Self {
4533        Self::DEFAULT
4534    }
4535}
4536#[cfg_attr(feature = "ts", derive(TS))]
4537#[cfg_attr(feature = "ts", ts(export))]
4538#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4539#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4540#[cfg_attr(feature = "serde", serde(tag = "type"))]
4541#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4542#[repr(u32)]
4543#[doc = "Airborne status of UAS."]
4544pub enum UtmFlightState {
4545    #[doc = "The flight state can't be determined."]
4546    UTM_FLIGHT_STATE_UNKNOWN = 1,
4547    #[doc = "UAS on ground."]
4548    UTM_FLIGHT_STATE_GROUND = 2,
4549    #[doc = "UAS airborne."]
4550    UTM_FLIGHT_STATE_AIRBORNE = 3,
4551    #[doc = "UAS is in an emergency flight state."]
4552    UTM_FLIGHT_STATE_EMERGENCY = 16,
4553    #[doc = "UAS has no active controls."]
4554    UTM_FLIGHT_STATE_NOCTRL = 32,
4555}
4556impl UtmFlightState {
4557    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4558}
4559impl Default for UtmFlightState {
4560    fn default() -> Self {
4561        Self::DEFAULT
4562    }
4563}
4564#[cfg_attr(feature = "ts", derive(TS))]
4565#[cfg_attr(feature = "ts", ts(export))]
4566#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4568#[cfg_attr(feature = "serde", serde(tag = "type"))]
4569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4570#[repr(u32)]
4571#[doc = "Video stream encodings"]
4572pub enum VideoStreamEncoding {
4573    #[doc = "Stream encoding is unknown"]
4574    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4575    #[doc = "Stream encoding is H.264"]
4576    VIDEO_STREAM_ENCODING_H264 = 1,
4577    #[doc = "Stream encoding is H.265"]
4578    VIDEO_STREAM_ENCODING_H265 = 2,
4579}
4580impl VideoStreamEncoding {
4581    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4582}
4583impl Default for VideoStreamEncoding {
4584    fn default() -> Self {
4585        Self::DEFAULT
4586    }
4587}
4588bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4589impl VideoStreamStatusFlags {
4590    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4591}
4592impl Default for VideoStreamStatusFlags {
4593    fn default() -> Self {
4594        Self::DEFAULT
4595    }
4596}
4597#[cfg_attr(feature = "ts", derive(TS))]
4598#[cfg_attr(feature = "ts", ts(export))]
4599#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4601#[cfg_attr(feature = "serde", serde(tag = "type"))]
4602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4603#[repr(u32)]
4604#[doc = "Video stream types"]
4605pub enum VideoStreamType {
4606    #[doc = "Stream is RTSP"]
4607    VIDEO_STREAM_TYPE_RTSP = 0,
4608    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4609    VIDEO_STREAM_TYPE_RTPUDP = 1,
4610    #[doc = "Stream is MPEG on TCP"]
4611    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4612    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4613    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4614}
4615impl VideoStreamType {
4616    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4617}
4618impl Default for VideoStreamType {
4619    fn default() -> Self {
4620        Self::DEFAULT
4621    }
4622}
4623#[cfg_attr(feature = "ts", derive(TS))]
4624#[cfg_attr(feature = "ts", ts(export))]
4625#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4627#[cfg_attr(feature = "serde", serde(tag = "type"))]
4628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4629#[repr(u32)]
4630#[doc = "Direction of VTOL transition"]
4631pub enum VtolTransitionHeading {
4632    #[doc = "Respect the heading configuration of the vehicle."]
4633    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4634    #[doc = "Use the heading pointing towards the next waypoint."]
4635    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4636    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4637    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4638    #[doc = "Use the specified heading in parameter 4."]
4639    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4640    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4641    VTOL_TRANSITION_HEADING_ANY = 4,
4642}
4643impl VtolTransitionHeading {
4644    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4645}
4646impl Default for VtolTransitionHeading {
4647    fn default() -> Self {
4648        Self::DEFAULT
4649    }
4650}
4651#[cfg_attr(feature = "ts", derive(TS))]
4652#[cfg_attr(feature = "ts", ts(export))]
4653#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4655#[cfg_attr(feature = "serde", serde(tag = "type"))]
4656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4657#[repr(u32)]
4658#[doc = "WiFi Mode."]
4659pub enum WifiConfigApMode {
4660    #[doc = "WiFi mode is undefined."]
4661    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4662    #[doc = "WiFi configured as an access point."]
4663    WIFI_CONFIG_AP_MODE_AP = 1,
4664    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4665    WIFI_CONFIG_AP_MODE_STATION = 2,
4666    #[doc = "WiFi disabled."]
4667    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4668}
4669impl WifiConfigApMode {
4670    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4671}
4672impl Default for WifiConfigApMode {
4673    fn default() -> Self {
4674        Self::DEFAULT
4675    }
4676}
4677#[cfg_attr(feature = "ts", derive(TS))]
4678#[cfg_attr(feature = "ts", ts(export))]
4679#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4681#[cfg_attr(feature = "serde", serde(tag = "type"))]
4682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4683#[repr(u32)]
4684#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4685pub enum WifiConfigApResponse {
4686    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4687    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4688    #[doc = "Changes accepted."]
4689    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4690    #[doc = "Changes rejected."]
4691    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4692    #[doc = "Invalid Mode."]
4693    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4694    #[doc = "Invalid SSID."]
4695    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4696    #[doc = "Invalid Password."]
4697    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4698}
4699impl WifiConfigApResponse {
4700    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4701}
4702impl Default for WifiConfigApResponse {
4703    fn default() -> Self {
4704        Self::DEFAULT
4705    }
4706}
4707#[cfg_attr(feature = "ts", derive(TS))]
4708#[cfg_attr(feature = "ts", ts(export))]
4709#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4711#[cfg_attr(feature = "serde", serde(tag = "type"))]
4712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4713#[repr(u32)]
4714#[doc = "Winch actions."]
4715pub enum WinchActions {
4716    #[doc = "Allow motor to freewheel."]
4717    WINCH_RELAXED = 0,
4718    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4719    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4720    #[doc = "Wind or unwind line at specified rate."]
4721    WINCH_RATE_CONTROL = 2,
4722    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4723    WINCH_LOCK = 3,
4724    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4725    WINCH_DELIVER = 4,
4726    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4727    WINCH_HOLD = 5,
4728    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4729    WINCH_RETRACT = 6,
4730    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4731    WINCH_LOAD_LINE = 7,
4732    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4733    WINCH_ABANDON_LINE = 8,
4734    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4735    WINCH_LOAD_PAYLOAD = 9,
4736}
4737impl WinchActions {
4738    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4739}
4740impl Default for WinchActions {
4741    fn default() -> Self {
4742        Self::DEFAULT
4743    }
4744}
4745#[doc = "Set the vehicle attitude and body angular rates."]
4746#[doc = ""]
4747#[doc = "ID: 140"]
4748#[derive(Debug, Clone, PartialEq)]
4749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4751#[cfg_attr(feature = "ts", derive(TS))]
4752#[cfg_attr(feature = "ts", ts(export))]
4753pub struct ACTUATOR_CONTROL_TARGET_DATA {
4754    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4755    pub time_usec: u64,
4756    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4758    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4759    pub controls: [f32; 8],
4760    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4761    pub group_mlx: u8,
4762}
4763impl ACTUATOR_CONTROL_TARGET_DATA {
4764    pub const ENCODED_LEN: usize = 41usize;
4765    pub const DEFAULT: Self = Self {
4766        time_usec: 0_u64,
4767        controls: [0.0_f32; 8usize],
4768        group_mlx: 0_u8,
4769    };
4770    #[cfg(feature = "arbitrary")]
4771    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4772        use arbitrary::{Arbitrary, Unstructured};
4773        let mut buf = [0u8; 1024];
4774        rng.fill_bytes(&mut buf);
4775        let mut unstructured = Unstructured::new(&buf);
4776        Self::arbitrary(&mut unstructured).unwrap_or_default()
4777    }
4778}
4779impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4780    fn default() -> Self {
4781        Self::DEFAULT.clone()
4782    }
4783}
4784impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4785    type Message = MavMessage;
4786    const ID: u32 = 140u32;
4787    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4788    const EXTRA_CRC: u8 = 181u8;
4789    const ENCODED_LEN: usize = 41usize;
4790    fn deser(
4791        _version: MavlinkVersion,
4792        __input: &[u8],
4793    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4794        let avail_len = __input.len();
4795        let mut payload_buf = [0; Self::ENCODED_LEN];
4796        let mut buf = if avail_len < Self::ENCODED_LEN {
4797            payload_buf[0..avail_len].copy_from_slice(__input);
4798            Bytes::new(&payload_buf)
4799        } else {
4800            Bytes::new(__input)
4801        };
4802        let mut __struct = Self::default();
4803        __struct.time_usec = buf.get_u64_le()?;
4804        for v in &mut __struct.controls {
4805            let val = buf.get_f32_le()?;
4806            *v = val;
4807        }
4808        __struct.group_mlx = buf.get_u8()?;
4809        Ok(__struct)
4810    }
4811    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4812        let mut __tmp = BytesMut::new(bytes);
4813        #[allow(clippy::absurd_extreme_comparisons)]
4814        #[allow(unused_comparisons)]
4815        if __tmp.remaining() < Self::ENCODED_LEN {
4816            panic!(
4817                "buffer is too small (need {} bytes, but got {})",
4818                Self::ENCODED_LEN,
4819                __tmp.remaining(),
4820            )
4821        }
4822        __tmp.put_u64_le(self.time_usec);
4823        for val in &self.controls {
4824            __tmp.put_f32_le(*val);
4825        }
4826        __tmp.put_u8(self.group_mlx);
4827        if matches!(version, MavlinkVersion::V2) {
4828            let len = __tmp.len();
4829            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4830        } else {
4831            __tmp.len()
4832        }
4833    }
4834}
4835#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4836#[doc = ""]
4837#[doc = "ID: 375"]
4838#[derive(Debug, Clone, PartialEq)]
4839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4841#[cfg_attr(feature = "ts", derive(TS))]
4842#[cfg_attr(feature = "ts", ts(export))]
4843pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4844    #[doc = "Timestamp (since system boot)."]
4845    pub time_usec: u64,
4846    #[doc = "Active outputs"]
4847    pub active: u32,
4848    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4849    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4850    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4851    pub actuator: [f32; 32],
4852}
4853impl ACTUATOR_OUTPUT_STATUS_DATA {
4854    pub const ENCODED_LEN: usize = 140usize;
4855    pub const DEFAULT: Self = Self {
4856        time_usec: 0_u64,
4857        active: 0_u32,
4858        actuator: [0.0_f32; 32usize],
4859    };
4860    #[cfg(feature = "arbitrary")]
4861    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4862        use arbitrary::{Arbitrary, Unstructured};
4863        let mut buf = [0u8; 1024];
4864        rng.fill_bytes(&mut buf);
4865        let mut unstructured = Unstructured::new(&buf);
4866        Self::arbitrary(&mut unstructured).unwrap_or_default()
4867    }
4868}
4869impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4870    fn default() -> Self {
4871        Self::DEFAULT.clone()
4872    }
4873}
4874impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4875    type Message = MavMessage;
4876    const ID: u32 = 375u32;
4877    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4878    const EXTRA_CRC: u8 = 251u8;
4879    const ENCODED_LEN: usize = 140usize;
4880    fn deser(
4881        _version: MavlinkVersion,
4882        __input: &[u8],
4883    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4884        let avail_len = __input.len();
4885        let mut payload_buf = [0; Self::ENCODED_LEN];
4886        let mut buf = if avail_len < Self::ENCODED_LEN {
4887            payload_buf[0..avail_len].copy_from_slice(__input);
4888            Bytes::new(&payload_buf)
4889        } else {
4890            Bytes::new(__input)
4891        };
4892        let mut __struct = Self::default();
4893        __struct.time_usec = buf.get_u64_le()?;
4894        __struct.active = buf.get_u32_le()?;
4895        for v in &mut __struct.actuator {
4896            let val = buf.get_f32_le()?;
4897            *v = val;
4898        }
4899        Ok(__struct)
4900    }
4901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4902        let mut __tmp = BytesMut::new(bytes);
4903        #[allow(clippy::absurd_extreme_comparisons)]
4904        #[allow(unused_comparisons)]
4905        if __tmp.remaining() < Self::ENCODED_LEN {
4906            panic!(
4907                "buffer is too small (need {} bytes, but got {})",
4908                Self::ENCODED_LEN,
4909                __tmp.remaining(),
4910            )
4911        }
4912        __tmp.put_u64_le(self.time_usec);
4913        __tmp.put_u32_le(self.active);
4914        for val in &self.actuator {
4915            __tmp.put_f32_le(*val);
4916        }
4917        if matches!(version, MavlinkVersion::V2) {
4918            let len = __tmp.len();
4919            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4920        } else {
4921            __tmp.len()
4922        }
4923    }
4924}
4925#[doc = "The location and information of an ADSB vehicle."]
4926#[doc = ""]
4927#[doc = "ID: 246"]
4928#[derive(Debug, Clone, PartialEq)]
4929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4931#[cfg_attr(feature = "ts", derive(TS))]
4932#[cfg_attr(feature = "ts", ts(export))]
4933pub struct ADSB_VEHICLE_DATA {
4934    #[doc = "ICAO address"]
4935    pub ICAO_address: u32,
4936    #[doc = "Latitude"]
4937    pub lat: i32,
4938    #[doc = "Longitude"]
4939    pub lon: i32,
4940    #[doc = "Altitude(ASL)"]
4941    pub altitude: i32,
4942    #[doc = "Course over ground"]
4943    pub heading: u16,
4944    #[doc = "The horizontal velocity"]
4945    pub hor_velocity: u16,
4946    #[doc = "The vertical velocity. Positive is up"]
4947    pub ver_velocity: i16,
4948    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4949    pub flags: AdsbFlags,
4950    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4951    pub squawk: u16,
4952    #[doc = "ADSB altitude type."]
4953    pub altitude_type: AdsbAltitudeType,
4954    #[doc = "The callsign, 8+null"]
4955    #[cfg_attr(feature = "ts", ts(type = "string"))]
4956    pub callsign: CharArray<9>,
4957    #[doc = "ADSB emitter type."]
4958    pub emitter_type: AdsbEmitterType,
4959    #[doc = "Time since last communication in seconds"]
4960    pub tslc: u8,
4961}
4962impl ADSB_VEHICLE_DATA {
4963    pub const ENCODED_LEN: usize = 38usize;
4964    pub const DEFAULT: Self = Self {
4965        ICAO_address: 0_u32,
4966        lat: 0_i32,
4967        lon: 0_i32,
4968        altitude: 0_i32,
4969        heading: 0_u16,
4970        hor_velocity: 0_u16,
4971        ver_velocity: 0_i16,
4972        flags: AdsbFlags::DEFAULT,
4973        squawk: 0_u16,
4974        altitude_type: AdsbAltitudeType::DEFAULT,
4975        callsign: CharArray::new([0_u8; 9usize]),
4976        emitter_type: AdsbEmitterType::DEFAULT,
4977        tslc: 0_u8,
4978    };
4979    #[cfg(feature = "arbitrary")]
4980    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4981        use arbitrary::{Arbitrary, Unstructured};
4982        let mut buf = [0u8; 1024];
4983        rng.fill_bytes(&mut buf);
4984        let mut unstructured = Unstructured::new(&buf);
4985        Self::arbitrary(&mut unstructured).unwrap_or_default()
4986    }
4987}
4988impl Default for ADSB_VEHICLE_DATA {
4989    fn default() -> Self {
4990        Self::DEFAULT.clone()
4991    }
4992}
4993impl MessageData for ADSB_VEHICLE_DATA {
4994    type Message = MavMessage;
4995    const ID: u32 = 246u32;
4996    const NAME: &'static str = "ADSB_VEHICLE";
4997    const EXTRA_CRC: u8 = 184u8;
4998    const ENCODED_LEN: usize = 38usize;
4999    fn deser(
5000        _version: MavlinkVersion,
5001        __input: &[u8],
5002    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5003        let avail_len = __input.len();
5004        let mut payload_buf = [0; Self::ENCODED_LEN];
5005        let mut buf = if avail_len < Self::ENCODED_LEN {
5006            payload_buf[0..avail_len].copy_from_slice(__input);
5007            Bytes::new(&payload_buf)
5008        } else {
5009            Bytes::new(__input)
5010        };
5011        let mut __struct = Self::default();
5012        __struct.ICAO_address = buf.get_u32_le()?;
5013        __struct.lat = buf.get_i32_le()?;
5014        __struct.lon = buf.get_i32_le()?;
5015        __struct.altitude = buf.get_i32_le()?;
5016        __struct.heading = buf.get_u16_le()?;
5017        __struct.hor_velocity = buf.get_u16_le()?;
5018        __struct.ver_velocity = buf.get_i16_le()?;
5019        let tmp = buf.get_u16_le()?;
5020        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
5021            ::mavlink_core::error::ParserError::InvalidFlag {
5022                flag_type: "AdsbFlags",
5023                value: tmp as u64,
5024            },
5025        )?;
5026        __struct.squawk = buf.get_u16_le()?;
5027        let tmp = buf.get_u8()?;
5028        __struct.altitude_type =
5029            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5030                enum_type: "AdsbAltitudeType",
5031                value: tmp as u64,
5032            })?;
5033        let mut tmp = [0_u8; 9usize];
5034        for v in &mut tmp {
5035            *v = buf.get_u8()?;
5036        }
5037        __struct.callsign = CharArray::new(tmp);
5038        let tmp = buf.get_u8()?;
5039        __struct.emitter_type =
5040            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5041                enum_type: "AdsbEmitterType",
5042                value: tmp as u64,
5043            })?;
5044        __struct.tslc = buf.get_u8()?;
5045        Ok(__struct)
5046    }
5047    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5048        let mut __tmp = BytesMut::new(bytes);
5049        #[allow(clippy::absurd_extreme_comparisons)]
5050        #[allow(unused_comparisons)]
5051        if __tmp.remaining() < Self::ENCODED_LEN {
5052            panic!(
5053                "buffer is too small (need {} bytes, but got {})",
5054                Self::ENCODED_LEN,
5055                __tmp.remaining(),
5056            )
5057        }
5058        __tmp.put_u32_le(self.ICAO_address);
5059        __tmp.put_i32_le(self.lat);
5060        __tmp.put_i32_le(self.lon);
5061        __tmp.put_i32_le(self.altitude);
5062        __tmp.put_u16_le(self.heading);
5063        __tmp.put_u16_le(self.hor_velocity);
5064        __tmp.put_i16_le(self.ver_velocity);
5065        __tmp.put_u16_le(self.flags.bits() as u16);
5066        __tmp.put_u16_le(self.squawk);
5067        __tmp.put_u8(self.altitude_type as u8);
5068        for val in &self.callsign {
5069            __tmp.put_u8(*val);
5070        }
5071        __tmp.put_u8(self.emitter_type as u8);
5072        __tmp.put_u8(self.tslc);
5073        if matches!(version, MavlinkVersion::V2) {
5074            let len = __tmp.len();
5075            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5076        } else {
5077            __tmp.len()
5078        }
5079    }
5080}
5081#[doc = "The location and information of an AIS vessel."]
5082#[doc = ""]
5083#[doc = "ID: 301"]
5084#[derive(Debug, Clone, PartialEq)]
5085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5087#[cfg_attr(feature = "ts", derive(TS))]
5088#[cfg_attr(feature = "ts", ts(export))]
5089pub struct AIS_VESSEL_DATA {
5090    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5091    pub MMSI: u32,
5092    #[doc = "Latitude"]
5093    pub lat: i32,
5094    #[doc = "Longitude"]
5095    pub lon: i32,
5096    #[doc = "Course over ground"]
5097    pub COG: u16,
5098    #[doc = "True heading"]
5099    pub heading: u16,
5100    #[doc = "Speed over ground"]
5101    pub velocity: u16,
5102    #[doc = "Distance from lat/lon location to bow"]
5103    pub dimension_bow: u16,
5104    #[doc = "Distance from lat/lon location to stern"]
5105    pub dimension_stern: u16,
5106    #[doc = "Time since last communication in seconds"]
5107    pub tslc: u16,
5108    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5109    pub flags: AisFlags,
5110    #[doc = "Turn rate"]
5111    pub turn_rate: i8,
5112    #[doc = "Navigational status"]
5113    pub navigational_status: AisNavStatus,
5114    #[doc = "Type of vessels"]
5115    pub mavtype: AisType,
5116    #[doc = "Distance from lat/lon location to port side"]
5117    pub dimension_port: u8,
5118    #[doc = "Distance from lat/lon location to starboard side"]
5119    pub dimension_starboard: u8,
5120    #[doc = "The vessel callsign"]
5121    #[cfg_attr(feature = "ts", ts(type = "string"))]
5122    pub callsign: CharArray<7>,
5123    #[doc = "The vessel name"]
5124    #[cfg_attr(feature = "ts", ts(type = "string"))]
5125    pub name: CharArray<20>,
5126}
5127impl AIS_VESSEL_DATA {
5128    pub const ENCODED_LEN: usize = 58usize;
5129    pub const DEFAULT: Self = Self {
5130        MMSI: 0_u32,
5131        lat: 0_i32,
5132        lon: 0_i32,
5133        COG: 0_u16,
5134        heading: 0_u16,
5135        velocity: 0_u16,
5136        dimension_bow: 0_u16,
5137        dimension_stern: 0_u16,
5138        tslc: 0_u16,
5139        flags: AisFlags::DEFAULT,
5140        turn_rate: 0_i8,
5141        navigational_status: AisNavStatus::DEFAULT,
5142        mavtype: AisType::DEFAULT,
5143        dimension_port: 0_u8,
5144        dimension_starboard: 0_u8,
5145        callsign: CharArray::new([0_u8; 7usize]),
5146        name: CharArray::new([0_u8; 20usize]),
5147    };
5148    #[cfg(feature = "arbitrary")]
5149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5150        use arbitrary::{Arbitrary, Unstructured};
5151        let mut buf = [0u8; 1024];
5152        rng.fill_bytes(&mut buf);
5153        let mut unstructured = Unstructured::new(&buf);
5154        Self::arbitrary(&mut unstructured).unwrap_or_default()
5155    }
5156}
5157impl Default for AIS_VESSEL_DATA {
5158    fn default() -> Self {
5159        Self::DEFAULT.clone()
5160    }
5161}
5162impl MessageData for AIS_VESSEL_DATA {
5163    type Message = MavMessage;
5164    const ID: u32 = 301u32;
5165    const NAME: &'static str = "AIS_VESSEL";
5166    const EXTRA_CRC: u8 = 243u8;
5167    const ENCODED_LEN: usize = 58usize;
5168    fn deser(
5169        _version: MavlinkVersion,
5170        __input: &[u8],
5171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5172        let avail_len = __input.len();
5173        let mut payload_buf = [0; Self::ENCODED_LEN];
5174        let mut buf = if avail_len < Self::ENCODED_LEN {
5175            payload_buf[0..avail_len].copy_from_slice(__input);
5176            Bytes::new(&payload_buf)
5177        } else {
5178            Bytes::new(__input)
5179        };
5180        let mut __struct = Self::default();
5181        __struct.MMSI = buf.get_u32_le()?;
5182        __struct.lat = buf.get_i32_le()?;
5183        __struct.lon = buf.get_i32_le()?;
5184        __struct.COG = buf.get_u16_le()?;
5185        __struct.heading = buf.get_u16_le()?;
5186        __struct.velocity = buf.get_u16_le()?;
5187        __struct.dimension_bow = buf.get_u16_le()?;
5188        __struct.dimension_stern = buf.get_u16_le()?;
5189        __struct.tslc = buf.get_u16_le()?;
5190        let tmp = buf.get_u16_le()?;
5191        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5192            ::mavlink_core::error::ParserError::InvalidFlag {
5193                flag_type: "AisFlags",
5194                value: tmp as u64,
5195            },
5196        )?;
5197        __struct.turn_rate = buf.get_i8()?;
5198        let tmp = buf.get_u8()?;
5199        __struct.navigational_status =
5200            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5201                enum_type: "AisNavStatus",
5202                value: tmp as u64,
5203            })?;
5204        let tmp = buf.get_u8()?;
5205        __struct.mavtype =
5206            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5207                enum_type: "AisType",
5208                value: tmp as u64,
5209            })?;
5210        __struct.dimension_port = buf.get_u8()?;
5211        __struct.dimension_starboard = buf.get_u8()?;
5212        let mut tmp = [0_u8; 7usize];
5213        for v in &mut tmp {
5214            *v = buf.get_u8()?;
5215        }
5216        __struct.callsign = CharArray::new(tmp);
5217        let mut tmp = [0_u8; 20usize];
5218        for v in &mut tmp {
5219            *v = buf.get_u8()?;
5220        }
5221        __struct.name = CharArray::new(tmp);
5222        Ok(__struct)
5223    }
5224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5225        let mut __tmp = BytesMut::new(bytes);
5226        #[allow(clippy::absurd_extreme_comparisons)]
5227        #[allow(unused_comparisons)]
5228        if __tmp.remaining() < Self::ENCODED_LEN {
5229            panic!(
5230                "buffer is too small (need {} bytes, but got {})",
5231                Self::ENCODED_LEN,
5232                __tmp.remaining(),
5233            )
5234        }
5235        __tmp.put_u32_le(self.MMSI);
5236        __tmp.put_i32_le(self.lat);
5237        __tmp.put_i32_le(self.lon);
5238        __tmp.put_u16_le(self.COG);
5239        __tmp.put_u16_le(self.heading);
5240        __tmp.put_u16_le(self.velocity);
5241        __tmp.put_u16_le(self.dimension_bow);
5242        __tmp.put_u16_le(self.dimension_stern);
5243        __tmp.put_u16_le(self.tslc);
5244        __tmp.put_u16_le(self.flags.bits() as u16);
5245        __tmp.put_i8(self.turn_rate);
5246        __tmp.put_u8(self.navigational_status as u8);
5247        __tmp.put_u8(self.mavtype as u8);
5248        __tmp.put_u8(self.dimension_port);
5249        __tmp.put_u8(self.dimension_starboard);
5250        for val in &self.callsign {
5251            __tmp.put_u8(*val);
5252        }
5253        for val in &self.name {
5254            __tmp.put_u8(*val);
5255        }
5256        if matches!(version, MavlinkVersion::V2) {
5257            let len = __tmp.len();
5258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5259        } else {
5260            __tmp.len()
5261        }
5262    }
5263}
5264#[doc = "The current system altitude."]
5265#[doc = ""]
5266#[doc = "ID: 141"]
5267#[derive(Debug, Clone, PartialEq)]
5268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5270#[cfg_attr(feature = "ts", derive(TS))]
5271#[cfg_attr(feature = "ts", ts(export))]
5272pub struct ALTITUDE_DATA {
5273    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5274    pub time_usec: u64,
5275    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5276    pub altitude_monotonic: f32,
5277    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5278    pub altitude_amsl: f32,
5279    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5280    pub altitude_local: f32,
5281    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5282    pub altitude_relative: f32,
5283    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5284    pub altitude_terrain: f32,
5285    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5286    pub bottom_clearance: f32,
5287}
5288impl ALTITUDE_DATA {
5289    pub const ENCODED_LEN: usize = 32usize;
5290    pub const DEFAULT: Self = Self {
5291        time_usec: 0_u64,
5292        altitude_monotonic: 0.0_f32,
5293        altitude_amsl: 0.0_f32,
5294        altitude_local: 0.0_f32,
5295        altitude_relative: 0.0_f32,
5296        altitude_terrain: 0.0_f32,
5297        bottom_clearance: 0.0_f32,
5298    };
5299    #[cfg(feature = "arbitrary")]
5300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5301        use arbitrary::{Arbitrary, Unstructured};
5302        let mut buf = [0u8; 1024];
5303        rng.fill_bytes(&mut buf);
5304        let mut unstructured = Unstructured::new(&buf);
5305        Self::arbitrary(&mut unstructured).unwrap_or_default()
5306    }
5307}
5308impl Default for ALTITUDE_DATA {
5309    fn default() -> Self {
5310        Self::DEFAULT.clone()
5311    }
5312}
5313impl MessageData for ALTITUDE_DATA {
5314    type Message = MavMessage;
5315    const ID: u32 = 141u32;
5316    const NAME: &'static str = "ALTITUDE";
5317    const EXTRA_CRC: u8 = 47u8;
5318    const ENCODED_LEN: usize = 32usize;
5319    fn deser(
5320        _version: MavlinkVersion,
5321        __input: &[u8],
5322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5323        let avail_len = __input.len();
5324        let mut payload_buf = [0; Self::ENCODED_LEN];
5325        let mut buf = if avail_len < Self::ENCODED_LEN {
5326            payload_buf[0..avail_len].copy_from_slice(__input);
5327            Bytes::new(&payload_buf)
5328        } else {
5329            Bytes::new(__input)
5330        };
5331        let mut __struct = Self::default();
5332        __struct.time_usec = buf.get_u64_le()?;
5333        __struct.altitude_monotonic = buf.get_f32_le()?;
5334        __struct.altitude_amsl = buf.get_f32_le()?;
5335        __struct.altitude_local = buf.get_f32_le()?;
5336        __struct.altitude_relative = buf.get_f32_le()?;
5337        __struct.altitude_terrain = buf.get_f32_le()?;
5338        __struct.bottom_clearance = buf.get_f32_le()?;
5339        Ok(__struct)
5340    }
5341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5342        let mut __tmp = BytesMut::new(bytes);
5343        #[allow(clippy::absurd_extreme_comparisons)]
5344        #[allow(unused_comparisons)]
5345        if __tmp.remaining() < Self::ENCODED_LEN {
5346            panic!(
5347                "buffer is too small (need {} bytes, but got {})",
5348                Self::ENCODED_LEN,
5349                __tmp.remaining(),
5350            )
5351        }
5352        __tmp.put_u64_le(self.time_usec);
5353        __tmp.put_f32_le(self.altitude_monotonic);
5354        __tmp.put_f32_le(self.altitude_amsl);
5355        __tmp.put_f32_le(self.altitude_local);
5356        __tmp.put_f32_le(self.altitude_relative);
5357        __tmp.put_f32_le(self.altitude_terrain);
5358        __tmp.put_f32_le(self.bottom_clearance);
5359        if matches!(version, MavlinkVersion::V2) {
5360            let len = __tmp.len();
5361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5362        } else {
5363            __tmp.len()
5364        }
5365    }
5366}
5367#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5368#[doc = ""]
5369#[doc = "ID: 30"]
5370#[derive(Debug, Clone, PartialEq)]
5371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5373#[cfg_attr(feature = "ts", derive(TS))]
5374#[cfg_attr(feature = "ts", ts(export))]
5375pub struct ATTITUDE_DATA {
5376    #[doc = "Timestamp (time since system boot)."]
5377    pub time_boot_ms: u32,
5378    #[doc = "Roll angle (-pi..+pi)"]
5379    pub roll: f32,
5380    #[doc = "Pitch angle (-pi..+pi)"]
5381    pub pitch: f32,
5382    #[doc = "Yaw angle (-pi..+pi)"]
5383    pub yaw: f32,
5384    #[doc = "Roll angular speed"]
5385    pub rollspeed: f32,
5386    #[doc = "Pitch angular speed"]
5387    pub pitchspeed: f32,
5388    #[doc = "Yaw angular speed"]
5389    pub yawspeed: f32,
5390}
5391impl ATTITUDE_DATA {
5392    pub const ENCODED_LEN: usize = 28usize;
5393    pub const DEFAULT: Self = Self {
5394        time_boot_ms: 0_u32,
5395        roll: 0.0_f32,
5396        pitch: 0.0_f32,
5397        yaw: 0.0_f32,
5398        rollspeed: 0.0_f32,
5399        pitchspeed: 0.0_f32,
5400        yawspeed: 0.0_f32,
5401    };
5402    #[cfg(feature = "arbitrary")]
5403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5404        use arbitrary::{Arbitrary, Unstructured};
5405        let mut buf = [0u8; 1024];
5406        rng.fill_bytes(&mut buf);
5407        let mut unstructured = Unstructured::new(&buf);
5408        Self::arbitrary(&mut unstructured).unwrap_or_default()
5409    }
5410}
5411impl Default for ATTITUDE_DATA {
5412    fn default() -> Self {
5413        Self::DEFAULT.clone()
5414    }
5415}
5416impl MessageData for ATTITUDE_DATA {
5417    type Message = MavMessage;
5418    const ID: u32 = 30u32;
5419    const NAME: &'static str = "ATTITUDE";
5420    const EXTRA_CRC: u8 = 39u8;
5421    const ENCODED_LEN: usize = 28usize;
5422    fn deser(
5423        _version: MavlinkVersion,
5424        __input: &[u8],
5425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5426        let avail_len = __input.len();
5427        let mut payload_buf = [0; Self::ENCODED_LEN];
5428        let mut buf = if avail_len < Self::ENCODED_LEN {
5429            payload_buf[0..avail_len].copy_from_slice(__input);
5430            Bytes::new(&payload_buf)
5431        } else {
5432            Bytes::new(__input)
5433        };
5434        let mut __struct = Self::default();
5435        __struct.time_boot_ms = buf.get_u32_le()?;
5436        __struct.roll = buf.get_f32_le()?;
5437        __struct.pitch = buf.get_f32_le()?;
5438        __struct.yaw = buf.get_f32_le()?;
5439        __struct.rollspeed = buf.get_f32_le()?;
5440        __struct.pitchspeed = buf.get_f32_le()?;
5441        __struct.yawspeed = buf.get_f32_le()?;
5442        Ok(__struct)
5443    }
5444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5445        let mut __tmp = BytesMut::new(bytes);
5446        #[allow(clippy::absurd_extreme_comparisons)]
5447        #[allow(unused_comparisons)]
5448        if __tmp.remaining() < Self::ENCODED_LEN {
5449            panic!(
5450                "buffer is too small (need {} bytes, but got {})",
5451                Self::ENCODED_LEN,
5452                __tmp.remaining(),
5453            )
5454        }
5455        __tmp.put_u32_le(self.time_boot_ms);
5456        __tmp.put_f32_le(self.roll);
5457        __tmp.put_f32_le(self.pitch);
5458        __tmp.put_f32_le(self.yaw);
5459        __tmp.put_f32_le(self.rollspeed);
5460        __tmp.put_f32_le(self.pitchspeed);
5461        __tmp.put_f32_le(self.yawspeed);
5462        if matches!(version, MavlinkVersion::V2) {
5463            let len = __tmp.len();
5464            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5465        } else {
5466            __tmp.len()
5467        }
5468    }
5469}
5470#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5471#[doc = ""]
5472#[doc = "ID: 31"]
5473#[derive(Debug, Clone, PartialEq)]
5474#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5476#[cfg_attr(feature = "ts", derive(TS))]
5477#[cfg_attr(feature = "ts", ts(export))]
5478pub struct ATTITUDE_QUATERNION_DATA {
5479    #[doc = "Timestamp (time since system boot)."]
5480    pub time_boot_ms: u32,
5481    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5482    pub q1: f32,
5483    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5484    pub q2: f32,
5485    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5486    pub q3: f32,
5487    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5488    pub q4: f32,
5489    #[doc = "Roll angular speed"]
5490    pub rollspeed: f32,
5491    #[doc = "Pitch angular speed"]
5492    pub pitchspeed: f32,
5493    #[doc = "Yaw angular speed"]
5494    pub yawspeed: f32,
5495    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5496    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5497    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5498    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5499    pub repr_offset_q: [f32; 4],
5500}
5501impl ATTITUDE_QUATERNION_DATA {
5502    pub const ENCODED_LEN: usize = 48usize;
5503    pub const DEFAULT: Self = Self {
5504        time_boot_ms: 0_u32,
5505        q1: 0.0_f32,
5506        q2: 0.0_f32,
5507        q3: 0.0_f32,
5508        q4: 0.0_f32,
5509        rollspeed: 0.0_f32,
5510        pitchspeed: 0.0_f32,
5511        yawspeed: 0.0_f32,
5512        repr_offset_q: [0.0_f32; 4usize],
5513    };
5514    #[cfg(feature = "arbitrary")]
5515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5516        use arbitrary::{Arbitrary, Unstructured};
5517        let mut buf = [0u8; 1024];
5518        rng.fill_bytes(&mut buf);
5519        let mut unstructured = Unstructured::new(&buf);
5520        Self::arbitrary(&mut unstructured).unwrap_or_default()
5521    }
5522}
5523impl Default for ATTITUDE_QUATERNION_DATA {
5524    fn default() -> Self {
5525        Self::DEFAULT.clone()
5526    }
5527}
5528impl MessageData for ATTITUDE_QUATERNION_DATA {
5529    type Message = MavMessage;
5530    const ID: u32 = 31u32;
5531    const NAME: &'static str = "ATTITUDE_QUATERNION";
5532    const EXTRA_CRC: u8 = 246u8;
5533    const ENCODED_LEN: usize = 48usize;
5534    fn deser(
5535        _version: MavlinkVersion,
5536        __input: &[u8],
5537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5538        let avail_len = __input.len();
5539        let mut payload_buf = [0; Self::ENCODED_LEN];
5540        let mut buf = if avail_len < Self::ENCODED_LEN {
5541            payload_buf[0..avail_len].copy_from_slice(__input);
5542            Bytes::new(&payload_buf)
5543        } else {
5544            Bytes::new(__input)
5545        };
5546        let mut __struct = Self::default();
5547        __struct.time_boot_ms = buf.get_u32_le()?;
5548        __struct.q1 = buf.get_f32_le()?;
5549        __struct.q2 = buf.get_f32_le()?;
5550        __struct.q3 = buf.get_f32_le()?;
5551        __struct.q4 = buf.get_f32_le()?;
5552        __struct.rollspeed = buf.get_f32_le()?;
5553        __struct.pitchspeed = buf.get_f32_le()?;
5554        __struct.yawspeed = buf.get_f32_le()?;
5555        for v in &mut __struct.repr_offset_q {
5556            let val = buf.get_f32_le()?;
5557            *v = val;
5558        }
5559        Ok(__struct)
5560    }
5561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5562        let mut __tmp = BytesMut::new(bytes);
5563        #[allow(clippy::absurd_extreme_comparisons)]
5564        #[allow(unused_comparisons)]
5565        if __tmp.remaining() < Self::ENCODED_LEN {
5566            panic!(
5567                "buffer is too small (need {} bytes, but got {})",
5568                Self::ENCODED_LEN,
5569                __tmp.remaining(),
5570            )
5571        }
5572        __tmp.put_u32_le(self.time_boot_ms);
5573        __tmp.put_f32_le(self.q1);
5574        __tmp.put_f32_le(self.q2);
5575        __tmp.put_f32_le(self.q3);
5576        __tmp.put_f32_le(self.q4);
5577        __tmp.put_f32_le(self.rollspeed);
5578        __tmp.put_f32_le(self.pitchspeed);
5579        __tmp.put_f32_le(self.yawspeed);
5580        if matches!(version, MavlinkVersion::V2) {
5581            for val in &self.repr_offset_q {
5582                __tmp.put_f32_le(*val);
5583            }
5584            let len = __tmp.len();
5585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5586        } else {
5587            __tmp.len()
5588        }
5589    }
5590}
5591#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5592#[doc = ""]
5593#[doc = "ID: 61"]
5594#[derive(Debug, Clone, PartialEq)]
5595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5597#[cfg_attr(feature = "ts", derive(TS))]
5598#[cfg_attr(feature = "ts", ts(export))]
5599pub struct ATTITUDE_QUATERNION_COV_DATA {
5600    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5601    pub time_usec: u64,
5602    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5603    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5604    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5605    pub q: [f32; 4],
5606    #[doc = "Roll angular speed"]
5607    pub rollspeed: f32,
5608    #[doc = "Pitch angular speed"]
5609    pub pitchspeed: f32,
5610    #[doc = "Yaw angular speed"]
5611    pub yawspeed: f32,
5612    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5614    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5615    pub covariance: [f32; 9],
5616}
5617impl ATTITUDE_QUATERNION_COV_DATA {
5618    pub const ENCODED_LEN: usize = 72usize;
5619    pub const DEFAULT: Self = Self {
5620        time_usec: 0_u64,
5621        q: [0.0_f32; 4usize],
5622        rollspeed: 0.0_f32,
5623        pitchspeed: 0.0_f32,
5624        yawspeed: 0.0_f32,
5625        covariance: [0.0_f32; 9usize],
5626    };
5627    #[cfg(feature = "arbitrary")]
5628    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5629        use arbitrary::{Arbitrary, Unstructured};
5630        let mut buf = [0u8; 1024];
5631        rng.fill_bytes(&mut buf);
5632        let mut unstructured = Unstructured::new(&buf);
5633        Self::arbitrary(&mut unstructured).unwrap_or_default()
5634    }
5635}
5636impl Default for ATTITUDE_QUATERNION_COV_DATA {
5637    fn default() -> Self {
5638        Self::DEFAULT.clone()
5639    }
5640}
5641impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5642    type Message = MavMessage;
5643    const ID: u32 = 61u32;
5644    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5645    const EXTRA_CRC: u8 = 167u8;
5646    const ENCODED_LEN: usize = 72usize;
5647    fn deser(
5648        _version: MavlinkVersion,
5649        __input: &[u8],
5650    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5651        let avail_len = __input.len();
5652        let mut payload_buf = [0; Self::ENCODED_LEN];
5653        let mut buf = if avail_len < Self::ENCODED_LEN {
5654            payload_buf[0..avail_len].copy_from_slice(__input);
5655            Bytes::new(&payload_buf)
5656        } else {
5657            Bytes::new(__input)
5658        };
5659        let mut __struct = Self::default();
5660        __struct.time_usec = buf.get_u64_le()?;
5661        for v in &mut __struct.q {
5662            let val = buf.get_f32_le()?;
5663            *v = val;
5664        }
5665        __struct.rollspeed = buf.get_f32_le()?;
5666        __struct.pitchspeed = buf.get_f32_le()?;
5667        __struct.yawspeed = buf.get_f32_le()?;
5668        for v in &mut __struct.covariance {
5669            let val = buf.get_f32_le()?;
5670            *v = val;
5671        }
5672        Ok(__struct)
5673    }
5674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5675        let mut __tmp = BytesMut::new(bytes);
5676        #[allow(clippy::absurd_extreme_comparisons)]
5677        #[allow(unused_comparisons)]
5678        if __tmp.remaining() < Self::ENCODED_LEN {
5679            panic!(
5680                "buffer is too small (need {} bytes, but got {})",
5681                Self::ENCODED_LEN,
5682                __tmp.remaining(),
5683            )
5684        }
5685        __tmp.put_u64_le(self.time_usec);
5686        for val in &self.q {
5687            __tmp.put_f32_le(*val);
5688        }
5689        __tmp.put_f32_le(self.rollspeed);
5690        __tmp.put_f32_le(self.pitchspeed);
5691        __tmp.put_f32_le(self.yawspeed);
5692        for val in &self.covariance {
5693            __tmp.put_f32_le(*val);
5694        }
5695        if matches!(version, MavlinkVersion::V2) {
5696            let len = __tmp.len();
5697            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5698        } else {
5699            __tmp.len()
5700        }
5701    }
5702}
5703#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5704#[doc = ""]
5705#[doc = "ID: 83"]
5706#[derive(Debug, Clone, PartialEq)]
5707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5709#[cfg_attr(feature = "ts", derive(TS))]
5710#[cfg_attr(feature = "ts", ts(export))]
5711pub struct ATTITUDE_TARGET_DATA {
5712    #[doc = "Timestamp (time since system boot)."]
5713    pub time_boot_ms: u32,
5714    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5715    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5716    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5717    pub q: [f32; 4],
5718    #[doc = "Body roll rate"]
5719    pub body_roll_rate: f32,
5720    #[doc = "Body pitch rate"]
5721    pub body_pitch_rate: f32,
5722    #[doc = "Body yaw rate"]
5723    pub body_yaw_rate: f32,
5724    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5725    pub thrust: f32,
5726    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5727    pub type_mask: AttitudeTargetTypemask,
5728}
5729impl ATTITUDE_TARGET_DATA {
5730    pub const ENCODED_LEN: usize = 37usize;
5731    pub const DEFAULT: Self = Self {
5732        time_boot_ms: 0_u32,
5733        q: [0.0_f32; 4usize],
5734        body_roll_rate: 0.0_f32,
5735        body_pitch_rate: 0.0_f32,
5736        body_yaw_rate: 0.0_f32,
5737        thrust: 0.0_f32,
5738        type_mask: AttitudeTargetTypemask::DEFAULT,
5739    };
5740    #[cfg(feature = "arbitrary")]
5741    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5742        use arbitrary::{Arbitrary, Unstructured};
5743        let mut buf = [0u8; 1024];
5744        rng.fill_bytes(&mut buf);
5745        let mut unstructured = Unstructured::new(&buf);
5746        Self::arbitrary(&mut unstructured).unwrap_or_default()
5747    }
5748}
5749impl Default for ATTITUDE_TARGET_DATA {
5750    fn default() -> Self {
5751        Self::DEFAULT.clone()
5752    }
5753}
5754impl MessageData for ATTITUDE_TARGET_DATA {
5755    type Message = MavMessage;
5756    const ID: u32 = 83u32;
5757    const NAME: &'static str = "ATTITUDE_TARGET";
5758    const EXTRA_CRC: u8 = 22u8;
5759    const ENCODED_LEN: usize = 37usize;
5760    fn deser(
5761        _version: MavlinkVersion,
5762        __input: &[u8],
5763    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5764        let avail_len = __input.len();
5765        let mut payload_buf = [0; Self::ENCODED_LEN];
5766        let mut buf = if avail_len < Self::ENCODED_LEN {
5767            payload_buf[0..avail_len].copy_from_slice(__input);
5768            Bytes::new(&payload_buf)
5769        } else {
5770            Bytes::new(__input)
5771        };
5772        let mut __struct = Self::default();
5773        __struct.time_boot_ms = buf.get_u32_le()?;
5774        for v in &mut __struct.q {
5775            let val = buf.get_f32_le()?;
5776            *v = val;
5777        }
5778        __struct.body_roll_rate = buf.get_f32_le()?;
5779        __struct.body_pitch_rate = buf.get_f32_le()?;
5780        __struct.body_yaw_rate = buf.get_f32_le()?;
5781        __struct.thrust = buf.get_f32_le()?;
5782        let tmp = buf.get_u8()?;
5783        __struct.type_mask =
5784            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
5785                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5786                    flag_type: "AttitudeTargetTypemask",
5787                    value: tmp as u64,
5788                })?;
5789        Ok(__struct)
5790    }
5791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5792        let mut __tmp = BytesMut::new(bytes);
5793        #[allow(clippy::absurd_extreme_comparisons)]
5794        #[allow(unused_comparisons)]
5795        if __tmp.remaining() < Self::ENCODED_LEN {
5796            panic!(
5797                "buffer is too small (need {} bytes, but got {})",
5798                Self::ENCODED_LEN,
5799                __tmp.remaining(),
5800            )
5801        }
5802        __tmp.put_u32_le(self.time_boot_ms);
5803        for val in &self.q {
5804            __tmp.put_f32_le(*val);
5805        }
5806        __tmp.put_f32_le(self.body_roll_rate);
5807        __tmp.put_f32_le(self.body_pitch_rate);
5808        __tmp.put_f32_le(self.body_yaw_rate);
5809        __tmp.put_f32_le(self.thrust);
5810        __tmp.put_u8(self.type_mask.bits() as u8);
5811        if matches!(version, MavlinkVersion::V2) {
5812            let len = __tmp.len();
5813            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5814        } else {
5815            __tmp.len()
5816        }
5817    }
5818}
5819#[doc = "Motion capture attitude and position."]
5820#[doc = ""]
5821#[doc = "ID: 138"]
5822#[derive(Debug, Clone, PartialEq)]
5823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5825#[cfg_attr(feature = "ts", derive(TS))]
5826#[cfg_attr(feature = "ts", ts(export))]
5827pub struct ATT_POS_MOCAP_DATA {
5828    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5829    pub time_usec: u64,
5830    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5831    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5832    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5833    pub q: [f32; 4],
5834    #[doc = "X position (NED)"]
5835    pub x: f32,
5836    #[doc = "Y position (NED)"]
5837    pub y: f32,
5838    #[doc = "Z position (NED)"]
5839    pub z: f32,
5840    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5841    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5842    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5843    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5844    pub covariance: [f32; 21],
5845}
5846impl ATT_POS_MOCAP_DATA {
5847    pub const ENCODED_LEN: usize = 120usize;
5848    pub const DEFAULT: Self = Self {
5849        time_usec: 0_u64,
5850        q: [0.0_f32; 4usize],
5851        x: 0.0_f32,
5852        y: 0.0_f32,
5853        z: 0.0_f32,
5854        covariance: [0.0_f32; 21usize],
5855    };
5856    #[cfg(feature = "arbitrary")]
5857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5858        use arbitrary::{Arbitrary, Unstructured};
5859        let mut buf = [0u8; 1024];
5860        rng.fill_bytes(&mut buf);
5861        let mut unstructured = Unstructured::new(&buf);
5862        Self::arbitrary(&mut unstructured).unwrap_or_default()
5863    }
5864}
5865impl Default for ATT_POS_MOCAP_DATA {
5866    fn default() -> Self {
5867        Self::DEFAULT.clone()
5868    }
5869}
5870impl MessageData for ATT_POS_MOCAP_DATA {
5871    type Message = MavMessage;
5872    const ID: u32 = 138u32;
5873    const NAME: &'static str = "ATT_POS_MOCAP";
5874    const EXTRA_CRC: u8 = 109u8;
5875    const ENCODED_LEN: usize = 120usize;
5876    fn deser(
5877        _version: MavlinkVersion,
5878        __input: &[u8],
5879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5880        let avail_len = __input.len();
5881        let mut payload_buf = [0; Self::ENCODED_LEN];
5882        let mut buf = if avail_len < Self::ENCODED_LEN {
5883            payload_buf[0..avail_len].copy_from_slice(__input);
5884            Bytes::new(&payload_buf)
5885        } else {
5886            Bytes::new(__input)
5887        };
5888        let mut __struct = Self::default();
5889        __struct.time_usec = buf.get_u64_le()?;
5890        for v in &mut __struct.q {
5891            let val = buf.get_f32_le()?;
5892            *v = val;
5893        }
5894        __struct.x = buf.get_f32_le()?;
5895        __struct.y = buf.get_f32_le()?;
5896        __struct.z = buf.get_f32_le()?;
5897        for v in &mut __struct.covariance {
5898            let val = buf.get_f32_le()?;
5899            *v = val;
5900        }
5901        Ok(__struct)
5902    }
5903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5904        let mut __tmp = BytesMut::new(bytes);
5905        #[allow(clippy::absurd_extreme_comparisons)]
5906        #[allow(unused_comparisons)]
5907        if __tmp.remaining() < Self::ENCODED_LEN {
5908            panic!(
5909                "buffer is too small (need {} bytes, but got {})",
5910                Self::ENCODED_LEN,
5911                __tmp.remaining(),
5912            )
5913        }
5914        __tmp.put_u64_le(self.time_usec);
5915        for val in &self.q {
5916            __tmp.put_f32_le(*val);
5917        }
5918        __tmp.put_f32_le(self.x);
5919        __tmp.put_f32_le(self.y);
5920        __tmp.put_f32_le(self.z);
5921        if matches!(version, MavlinkVersion::V2) {
5922            for val in &self.covariance {
5923                __tmp.put_f32_le(*val);
5924            }
5925            let len = __tmp.len();
5926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5927        } else {
5928            __tmp.len()
5929        }
5930    }
5931}
5932#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5933#[doc = ""]
5934#[doc = "ID: 7"]
5935#[derive(Debug, Clone, PartialEq)]
5936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5938#[cfg_attr(feature = "ts", derive(TS))]
5939#[cfg_attr(feature = "ts", ts(export))]
5940pub struct AUTH_KEY_DATA {
5941    #[doc = "key"]
5942    #[cfg_attr(feature = "ts", ts(type = "string"))]
5943    pub key: CharArray<32>,
5944}
5945impl AUTH_KEY_DATA {
5946    pub const ENCODED_LEN: usize = 32usize;
5947    pub const DEFAULT: Self = Self {
5948        key: CharArray::new([0_u8; 32usize]),
5949    };
5950    #[cfg(feature = "arbitrary")]
5951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5952        use arbitrary::{Arbitrary, Unstructured};
5953        let mut buf = [0u8; 1024];
5954        rng.fill_bytes(&mut buf);
5955        let mut unstructured = Unstructured::new(&buf);
5956        Self::arbitrary(&mut unstructured).unwrap_or_default()
5957    }
5958}
5959impl Default for AUTH_KEY_DATA {
5960    fn default() -> Self {
5961        Self::DEFAULT.clone()
5962    }
5963}
5964impl MessageData for AUTH_KEY_DATA {
5965    type Message = MavMessage;
5966    const ID: u32 = 7u32;
5967    const NAME: &'static str = "AUTH_KEY";
5968    const EXTRA_CRC: u8 = 119u8;
5969    const ENCODED_LEN: usize = 32usize;
5970    fn deser(
5971        _version: MavlinkVersion,
5972        __input: &[u8],
5973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5974        let avail_len = __input.len();
5975        let mut payload_buf = [0; Self::ENCODED_LEN];
5976        let mut buf = if avail_len < Self::ENCODED_LEN {
5977            payload_buf[0..avail_len].copy_from_slice(__input);
5978            Bytes::new(&payload_buf)
5979        } else {
5980            Bytes::new(__input)
5981        };
5982        let mut __struct = Self::default();
5983        let mut tmp = [0_u8; 32usize];
5984        for v in &mut tmp {
5985            *v = buf.get_u8()?;
5986        }
5987        __struct.key = CharArray::new(tmp);
5988        Ok(__struct)
5989    }
5990    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5991        let mut __tmp = BytesMut::new(bytes);
5992        #[allow(clippy::absurd_extreme_comparisons)]
5993        #[allow(unused_comparisons)]
5994        if __tmp.remaining() < Self::ENCODED_LEN {
5995            panic!(
5996                "buffer is too small (need {} bytes, but got {})",
5997                Self::ENCODED_LEN,
5998                __tmp.remaining(),
5999            )
6000        }
6001        for val in &self.key {
6002            __tmp.put_u8(*val);
6003        }
6004        if matches!(version, MavlinkVersion::V2) {
6005            let len = __tmp.len();
6006            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6007        } else {
6008            __tmp.len()
6009        }
6010    }
6011}
6012#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6013#[doc = ""]
6014#[doc = "ID: 286"]
6015#[derive(Debug, Clone, PartialEq)]
6016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6018#[cfg_attr(feature = "ts", derive(TS))]
6019#[cfg_attr(feature = "ts", ts(export))]
6020pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6021    #[doc = "Timestamp (time since system boot)."]
6022    pub time_boot_us: u64,
6023    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6024    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6025    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6026    pub q: [f32; 4],
6027    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6028    pub q_estimated_delay_us: u32,
6029    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6030    pub vx: f32,
6031    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6032    pub vy: f32,
6033    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6034    pub vz: f32,
6035    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6036    pub v_estimated_delay_us: u32,
6037    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6038    pub feed_forward_angular_velocity_z: f32,
6039    #[doc = "Bitmap indicating which estimator outputs are valid."]
6040    pub estimator_status: EstimatorStatusFlags,
6041    #[doc = "System ID"]
6042    pub target_system: u8,
6043    #[doc = "Component ID"]
6044    pub target_component: u8,
6045    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6046    pub landed_state: MavLandedState,
6047    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6048    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6049    pub angular_velocity_z: f32,
6050}
6051impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6052    pub const ENCODED_LEN: usize = 57usize;
6053    pub const DEFAULT: Self = Self {
6054        time_boot_us: 0_u64,
6055        q: [0.0_f32; 4usize],
6056        q_estimated_delay_us: 0_u32,
6057        vx: 0.0_f32,
6058        vy: 0.0_f32,
6059        vz: 0.0_f32,
6060        v_estimated_delay_us: 0_u32,
6061        feed_forward_angular_velocity_z: 0.0_f32,
6062        estimator_status: EstimatorStatusFlags::DEFAULT,
6063        target_system: 0_u8,
6064        target_component: 0_u8,
6065        landed_state: MavLandedState::DEFAULT,
6066        angular_velocity_z: 0.0_f32,
6067    };
6068    #[cfg(feature = "arbitrary")]
6069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6070        use arbitrary::{Arbitrary, Unstructured};
6071        let mut buf = [0u8; 1024];
6072        rng.fill_bytes(&mut buf);
6073        let mut unstructured = Unstructured::new(&buf);
6074        Self::arbitrary(&mut unstructured).unwrap_or_default()
6075    }
6076}
6077impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6078    fn default() -> Self {
6079        Self::DEFAULT.clone()
6080    }
6081}
6082impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6083    type Message = MavMessage;
6084    const ID: u32 = 286u32;
6085    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6086    const EXTRA_CRC: u8 = 210u8;
6087    const ENCODED_LEN: usize = 57usize;
6088    fn deser(
6089        _version: MavlinkVersion,
6090        __input: &[u8],
6091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6092        let avail_len = __input.len();
6093        let mut payload_buf = [0; Self::ENCODED_LEN];
6094        let mut buf = if avail_len < Self::ENCODED_LEN {
6095            payload_buf[0..avail_len].copy_from_slice(__input);
6096            Bytes::new(&payload_buf)
6097        } else {
6098            Bytes::new(__input)
6099        };
6100        let mut __struct = Self::default();
6101        __struct.time_boot_us = buf.get_u64_le()?;
6102        for v in &mut __struct.q {
6103            let val = buf.get_f32_le()?;
6104            *v = val;
6105        }
6106        __struct.q_estimated_delay_us = buf.get_u32_le()?;
6107        __struct.vx = buf.get_f32_le()?;
6108        __struct.vy = buf.get_f32_le()?;
6109        __struct.vz = buf.get_f32_le()?;
6110        __struct.v_estimated_delay_us = buf.get_u32_le()?;
6111        __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
6112        let tmp = buf.get_u16_le()?;
6113        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6114            tmp as <EstimatorStatusFlags as Flags>::Bits,
6115        )
6116        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6117            flag_type: "EstimatorStatusFlags",
6118            value: tmp as u64,
6119        })?;
6120        __struct.target_system = buf.get_u8()?;
6121        __struct.target_component = buf.get_u8()?;
6122        let tmp = buf.get_u8()?;
6123        __struct.landed_state =
6124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6125                enum_type: "MavLandedState",
6126                value: tmp as u64,
6127            })?;
6128        __struct.angular_velocity_z = buf.get_f32_le()?;
6129        Ok(__struct)
6130    }
6131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6132        let mut __tmp = BytesMut::new(bytes);
6133        #[allow(clippy::absurd_extreme_comparisons)]
6134        #[allow(unused_comparisons)]
6135        if __tmp.remaining() < Self::ENCODED_LEN {
6136            panic!(
6137                "buffer is too small (need {} bytes, but got {})",
6138                Self::ENCODED_LEN,
6139                __tmp.remaining(),
6140            )
6141        }
6142        __tmp.put_u64_le(self.time_boot_us);
6143        for val in &self.q {
6144            __tmp.put_f32_le(*val);
6145        }
6146        __tmp.put_u32_le(self.q_estimated_delay_us);
6147        __tmp.put_f32_le(self.vx);
6148        __tmp.put_f32_le(self.vy);
6149        __tmp.put_f32_le(self.vz);
6150        __tmp.put_u32_le(self.v_estimated_delay_us);
6151        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6152        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6153        __tmp.put_u8(self.target_system);
6154        __tmp.put_u8(self.target_component);
6155        __tmp.put_u8(self.landed_state as u8);
6156        if matches!(version, MavlinkVersion::V2) {
6157            __tmp.put_f32_le(self.angular_velocity_z);
6158            let len = __tmp.len();
6159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6160        } else {
6161            __tmp.len()
6162        }
6163    }
6164}
6165#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6166#[doc = ""]
6167#[doc = "ID: 148"]
6168#[derive(Debug, Clone, PartialEq)]
6169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6171#[cfg_attr(feature = "ts", derive(TS))]
6172#[cfg_attr(feature = "ts", ts(export))]
6173pub struct AUTOPILOT_VERSION_DATA {
6174    #[doc = "Bitmap of capabilities"]
6175    pub capabilities: MavProtocolCapability,
6176    #[doc = "UID if provided by hardware (see uid2)"]
6177    pub uid: u64,
6178    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6179    pub flight_sw_version: u32,
6180    #[doc = "Middleware version number"]
6181    pub middleware_sw_version: u32,
6182    #[doc = "Operating system version number"]
6183    pub os_sw_version: u32,
6184    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6185    pub board_version: u32,
6186    #[doc = "ID of the board vendor"]
6187    pub vendor_id: u16,
6188    #[doc = "ID of the product"]
6189    pub product_id: u16,
6190    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6191    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6192    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6193    pub flight_custom_version: [u8; 8],
6194    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6195    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6196    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6197    pub middleware_custom_version: [u8; 8],
6198    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6199    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6200    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6201    pub os_custom_version: [u8; 8],
6202    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6203    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6204    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6205    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6206    pub uid2: [u8; 18],
6207}
6208impl AUTOPILOT_VERSION_DATA {
6209    pub const ENCODED_LEN: usize = 78usize;
6210    pub const DEFAULT: Self = Self {
6211        capabilities: MavProtocolCapability::DEFAULT,
6212        uid: 0_u64,
6213        flight_sw_version: 0_u32,
6214        middleware_sw_version: 0_u32,
6215        os_sw_version: 0_u32,
6216        board_version: 0_u32,
6217        vendor_id: 0_u16,
6218        product_id: 0_u16,
6219        flight_custom_version: [0_u8; 8usize],
6220        middleware_custom_version: [0_u8; 8usize],
6221        os_custom_version: [0_u8; 8usize],
6222        uid2: [0_u8; 18usize],
6223    };
6224    #[cfg(feature = "arbitrary")]
6225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6226        use arbitrary::{Arbitrary, Unstructured};
6227        let mut buf = [0u8; 1024];
6228        rng.fill_bytes(&mut buf);
6229        let mut unstructured = Unstructured::new(&buf);
6230        Self::arbitrary(&mut unstructured).unwrap_or_default()
6231    }
6232}
6233impl Default for AUTOPILOT_VERSION_DATA {
6234    fn default() -> Self {
6235        Self::DEFAULT.clone()
6236    }
6237}
6238impl MessageData for AUTOPILOT_VERSION_DATA {
6239    type Message = MavMessage;
6240    const ID: u32 = 148u32;
6241    const NAME: &'static str = "AUTOPILOT_VERSION";
6242    const EXTRA_CRC: u8 = 178u8;
6243    const ENCODED_LEN: usize = 78usize;
6244    fn deser(
6245        _version: MavlinkVersion,
6246        __input: &[u8],
6247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6248        let avail_len = __input.len();
6249        let mut payload_buf = [0; Self::ENCODED_LEN];
6250        let mut buf = if avail_len < Self::ENCODED_LEN {
6251            payload_buf[0..avail_len].copy_from_slice(__input);
6252            Bytes::new(&payload_buf)
6253        } else {
6254            Bytes::new(__input)
6255        };
6256        let mut __struct = Self::default();
6257        let tmp = buf.get_u64_le()?;
6258        __struct.capabilities = MavProtocolCapability::from_bits(
6259            tmp as <MavProtocolCapability as Flags>::Bits,
6260        )
6261        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6262            flag_type: "MavProtocolCapability",
6263            value: tmp as u64,
6264        })?;
6265        __struct.uid = buf.get_u64_le()?;
6266        __struct.flight_sw_version = buf.get_u32_le()?;
6267        __struct.middleware_sw_version = buf.get_u32_le()?;
6268        __struct.os_sw_version = buf.get_u32_le()?;
6269        __struct.board_version = buf.get_u32_le()?;
6270        __struct.vendor_id = buf.get_u16_le()?;
6271        __struct.product_id = buf.get_u16_le()?;
6272        for v in &mut __struct.flight_custom_version {
6273            let val = buf.get_u8()?;
6274            *v = val;
6275        }
6276        for v in &mut __struct.middleware_custom_version {
6277            let val = buf.get_u8()?;
6278            *v = val;
6279        }
6280        for v in &mut __struct.os_custom_version {
6281            let val = buf.get_u8()?;
6282            *v = val;
6283        }
6284        for v in &mut __struct.uid2 {
6285            let val = buf.get_u8()?;
6286            *v = val;
6287        }
6288        Ok(__struct)
6289    }
6290    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6291        let mut __tmp = BytesMut::new(bytes);
6292        #[allow(clippy::absurd_extreme_comparisons)]
6293        #[allow(unused_comparisons)]
6294        if __tmp.remaining() < Self::ENCODED_LEN {
6295            panic!(
6296                "buffer is too small (need {} bytes, but got {})",
6297                Self::ENCODED_LEN,
6298                __tmp.remaining(),
6299            )
6300        }
6301        __tmp.put_u64_le(self.capabilities.bits() as u64);
6302        __tmp.put_u64_le(self.uid);
6303        __tmp.put_u32_le(self.flight_sw_version);
6304        __tmp.put_u32_le(self.middleware_sw_version);
6305        __tmp.put_u32_le(self.os_sw_version);
6306        __tmp.put_u32_le(self.board_version);
6307        __tmp.put_u16_le(self.vendor_id);
6308        __tmp.put_u16_le(self.product_id);
6309        for val in &self.flight_custom_version {
6310            __tmp.put_u8(*val);
6311        }
6312        for val in &self.middleware_custom_version {
6313            __tmp.put_u8(*val);
6314        }
6315        for val in &self.os_custom_version {
6316            __tmp.put_u8(*val);
6317        }
6318        if matches!(version, MavlinkVersion::V2) {
6319            for val in &self.uid2 {
6320                __tmp.put_u8(*val);
6321            }
6322            let len = __tmp.len();
6323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6324        } else {
6325            __tmp.len()
6326        }
6327    }
6328}
6329#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6330#[doc = ""]
6331#[doc = "ID: 435"]
6332#[derive(Debug, Clone, PartialEq)]
6333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6335#[cfg_attr(feature = "ts", derive(TS))]
6336#[cfg_attr(feature = "ts", ts(export))]
6337pub struct AVAILABLE_MODES_DATA {
6338    #[doc = "A bitfield for use for autopilot-specific flags"]
6339    pub custom_mode: u32,
6340    #[doc = "Mode properties."]
6341    pub properties: MavModeProperty,
6342    #[doc = "The total number of available modes for the current vehicle type."]
6343    pub number_modes: u8,
6344    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6345    pub mode_index: u8,
6346    #[doc = "Standard mode."]
6347    pub standard_mode: MavStandardMode,
6348    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6349    #[cfg_attr(feature = "ts", ts(type = "string"))]
6350    pub mode_name: CharArray<35>,
6351}
6352impl AVAILABLE_MODES_DATA {
6353    pub const ENCODED_LEN: usize = 46usize;
6354    pub const DEFAULT: Self = Self {
6355        custom_mode: 0_u32,
6356        properties: MavModeProperty::DEFAULT,
6357        number_modes: 0_u8,
6358        mode_index: 0_u8,
6359        standard_mode: MavStandardMode::DEFAULT,
6360        mode_name: CharArray::new([0_u8; 35usize]),
6361    };
6362    #[cfg(feature = "arbitrary")]
6363    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6364        use arbitrary::{Arbitrary, Unstructured};
6365        let mut buf = [0u8; 1024];
6366        rng.fill_bytes(&mut buf);
6367        let mut unstructured = Unstructured::new(&buf);
6368        Self::arbitrary(&mut unstructured).unwrap_or_default()
6369    }
6370}
6371impl Default for AVAILABLE_MODES_DATA {
6372    fn default() -> Self {
6373        Self::DEFAULT.clone()
6374    }
6375}
6376impl MessageData for AVAILABLE_MODES_DATA {
6377    type Message = MavMessage;
6378    const ID: u32 = 435u32;
6379    const NAME: &'static str = "AVAILABLE_MODES";
6380    const EXTRA_CRC: u8 = 134u8;
6381    const ENCODED_LEN: usize = 46usize;
6382    fn deser(
6383        _version: MavlinkVersion,
6384        __input: &[u8],
6385    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6386        let avail_len = __input.len();
6387        let mut payload_buf = [0; Self::ENCODED_LEN];
6388        let mut buf = if avail_len < Self::ENCODED_LEN {
6389            payload_buf[0..avail_len].copy_from_slice(__input);
6390            Bytes::new(&payload_buf)
6391        } else {
6392            Bytes::new(__input)
6393        };
6394        let mut __struct = Self::default();
6395        __struct.custom_mode = buf.get_u32_le()?;
6396        let tmp = buf.get_u32_le()?;
6397        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6398            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6399            flag_type: "MavModeProperty",
6400            value: tmp as u64,
6401        })?;
6402        __struct.number_modes = buf.get_u8()?;
6403        __struct.mode_index = buf.get_u8()?;
6404        let tmp = buf.get_u8()?;
6405        __struct.standard_mode =
6406            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6407                enum_type: "MavStandardMode",
6408                value: tmp as u64,
6409            })?;
6410        let mut tmp = [0_u8; 35usize];
6411        for v in &mut tmp {
6412            *v = buf.get_u8()?;
6413        }
6414        __struct.mode_name = CharArray::new(tmp);
6415        Ok(__struct)
6416    }
6417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6418        let mut __tmp = BytesMut::new(bytes);
6419        #[allow(clippy::absurd_extreme_comparisons)]
6420        #[allow(unused_comparisons)]
6421        if __tmp.remaining() < Self::ENCODED_LEN {
6422            panic!(
6423                "buffer is too small (need {} bytes, but got {})",
6424                Self::ENCODED_LEN,
6425                __tmp.remaining(),
6426            )
6427        }
6428        __tmp.put_u32_le(self.custom_mode);
6429        __tmp.put_u32_le(self.properties.bits() as u32);
6430        __tmp.put_u8(self.number_modes);
6431        __tmp.put_u8(self.mode_index);
6432        __tmp.put_u8(self.standard_mode as u8);
6433        for val in &self.mode_name {
6434            __tmp.put_u8(*val);
6435        }
6436        if matches!(version, MavlinkVersion::V2) {
6437            let len = __tmp.len();
6438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6439        } else {
6440            __tmp.len()
6441        }
6442    }
6443}
6444#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6445#[doc = ""]
6446#[doc = "ID: 437"]
6447#[derive(Debug, Clone, PartialEq)]
6448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6450#[cfg_attr(feature = "ts", derive(TS))]
6451#[cfg_attr(feature = "ts", ts(export))]
6452pub struct AVAILABLE_MODES_MONITOR_DATA {
6453    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6454    pub seq: u8,
6455}
6456impl AVAILABLE_MODES_MONITOR_DATA {
6457    pub const ENCODED_LEN: usize = 1usize;
6458    pub const DEFAULT: Self = Self { seq: 0_u8 };
6459    #[cfg(feature = "arbitrary")]
6460    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6461        use arbitrary::{Arbitrary, Unstructured};
6462        let mut buf = [0u8; 1024];
6463        rng.fill_bytes(&mut buf);
6464        let mut unstructured = Unstructured::new(&buf);
6465        Self::arbitrary(&mut unstructured).unwrap_or_default()
6466    }
6467}
6468impl Default for AVAILABLE_MODES_MONITOR_DATA {
6469    fn default() -> Self {
6470        Self::DEFAULT.clone()
6471    }
6472}
6473impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6474    type Message = MavMessage;
6475    const ID: u32 = 437u32;
6476    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6477    const EXTRA_CRC: u8 = 30u8;
6478    const ENCODED_LEN: usize = 1usize;
6479    fn deser(
6480        _version: MavlinkVersion,
6481        __input: &[u8],
6482    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6483        let avail_len = __input.len();
6484        let mut payload_buf = [0; Self::ENCODED_LEN];
6485        let mut buf = if avail_len < Self::ENCODED_LEN {
6486            payload_buf[0..avail_len].copy_from_slice(__input);
6487            Bytes::new(&payload_buf)
6488        } else {
6489            Bytes::new(__input)
6490        };
6491        let mut __struct = Self::default();
6492        __struct.seq = buf.get_u8()?;
6493        Ok(__struct)
6494    }
6495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6496        let mut __tmp = BytesMut::new(bytes);
6497        #[allow(clippy::absurd_extreme_comparisons)]
6498        #[allow(unused_comparisons)]
6499        if __tmp.remaining() < Self::ENCODED_LEN {
6500            panic!(
6501                "buffer is too small (need {} bytes, but got {})",
6502                Self::ENCODED_LEN,
6503                __tmp.remaining(),
6504            )
6505        }
6506        __tmp.put_u8(self.seq);
6507        if matches!(version, MavlinkVersion::V2) {
6508            let len = __tmp.len();
6509            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6510        } else {
6511            __tmp.len()
6512        }
6513    }
6514}
6515#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6516#[doc = ""]
6517#[doc = "ID: 372"]
6518#[derive(Debug, Clone, PartialEq)]
6519#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6521#[cfg_attr(feature = "ts", derive(TS))]
6522#[cfg_attr(feature = "ts", ts(export))]
6523pub struct BATTERY_INFO_DATA {
6524    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6525    pub discharge_minimum_voltage: f32,
6526    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6527    pub charging_minimum_voltage: f32,
6528    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6529    pub resting_minimum_voltage: f32,
6530    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6531    pub charging_maximum_voltage: f32,
6532    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6533    pub charging_maximum_current: f32,
6534    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6535    pub nominal_voltage: f32,
6536    #[doc = "Maximum pack discharge current. 0: field not provided."]
6537    pub discharge_maximum_current: f32,
6538    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6539    pub discharge_maximum_burst_current: f32,
6540    #[doc = "Fully charged design capacity. 0: field not provided."]
6541    pub design_capacity: f32,
6542    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6543    pub full_charge_capacity: f32,
6544    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6545    pub cycle_count: u16,
6546    #[doc = "Battery weight. 0: field not provided."]
6547    pub weight: u16,
6548    #[doc = "Battery ID"]
6549    pub id: u8,
6550    #[doc = "Function of the battery."]
6551    pub battery_function: MavBatteryFunction,
6552    #[doc = "Type (chemistry) of the battery."]
6553    pub mavtype: MavBatteryType,
6554    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6555    pub state_of_health: u8,
6556    #[doc = "Number of battery cells in series. 0: field not provided."]
6557    pub cells_in_series: u8,
6558    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6559    #[cfg_attr(feature = "ts", ts(type = "string"))]
6560    pub manufacture_date: CharArray<9>,
6561    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6562    #[cfg_attr(feature = "ts", ts(type = "string"))]
6563    pub serial_number: CharArray<32>,
6564    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6565    #[cfg_attr(feature = "ts", ts(type = "string"))]
6566    pub name: CharArray<50>,
6567}
6568impl BATTERY_INFO_DATA {
6569    pub const ENCODED_LEN: usize = 140usize;
6570    pub const DEFAULT: Self = Self {
6571        discharge_minimum_voltage: 0.0_f32,
6572        charging_minimum_voltage: 0.0_f32,
6573        resting_minimum_voltage: 0.0_f32,
6574        charging_maximum_voltage: 0.0_f32,
6575        charging_maximum_current: 0.0_f32,
6576        nominal_voltage: 0.0_f32,
6577        discharge_maximum_current: 0.0_f32,
6578        discharge_maximum_burst_current: 0.0_f32,
6579        design_capacity: 0.0_f32,
6580        full_charge_capacity: 0.0_f32,
6581        cycle_count: 0_u16,
6582        weight: 0_u16,
6583        id: 0_u8,
6584        battery_function: MavBatteryFunction::DEFAULT,
6585        mavtype: MavBatteryType::DEFAULT,
6586        state_of_health: 0_u8,
6587        cells_in_series: 0_u8,
6588        manufacture_date: CharArray::new([0_u8; 9usize]),
6589        serial_number: CharArray::new([0_u8; 32usize]),
6590        name: CharArray::new([0_u8; 50usize]),
6591    };
6592    #[cfg(feature = "arbitrary")]
6593    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6594        use arbitrary::{Arbitrary, Unstructured};
6595        let mut buf = [0u8; 1024];
6596        rng.fill_bytes(&mut buf);
6597        let mut unstructured = Unstructured::new(&buf);
6598        Self::arbitrary(&mut unstructured).unwrap_or_default()
6599    }
6600}
6601impl Default for BATTERY_INFO_DATA {
6602    fn default() -> Self {
6603        Self::DEFAULT.clone()
6604    }
6605}
6606impl MessageData for BATTERY_INFO_DATA {
6607    type Message = MavMessage;
6608    const ID: u32 = 372u32;
6609    const NAME: &'static str = "BATTERY_INFO";
6610    const EXTRA_CRC: u8 = 26u8;
6611    const ENCODED_LEN: usize = 140usize;
6612    fn deser(
6613        _version: MavlinkVersion,
6614        __input: &[u8],
6615    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6616        let avail_len = __input.len();
6617        let mut payload_buf = [0; Self::ENCODED_LEN];
6618        let mut buf = if avail_len < Self::ENCODED_LEN {
6619            payload_buf[0..avail_len].copy_from_slice(__input);
6620            Bytes::new(&payload_buf)
6621        } else {
6622            Bytes::new(__input)
6623        };
6624        let mut __struct = Self::default();
6625        __struct.discharge_minimum_voltage = buf.get_f32_le()?;
6626        __struct.charging_minimum_voltage = buf.get_f32_le()?;
6627        __struct.resting_minimum_voltage = buf.get_f32_le()?;
6628        __struct.charging_maximum_voltage = buf.get_f32_le()?;
6629        __struct.charging_maximum_current = buf.get_f32_le()?;
6630        __struct.nominal_voltage = buf.get_f32_le()?;
6631        __struct.discharge_maximum_current = buf.get_f32_le()?;
6632        __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
6633        __struct.design_capacity = buf.get_f32_le()?;
6634        __struct.full_charge_capacity = buf.get_f32_le()?;
6635        __struct.cycle_count = buf.get_u16_le()?;
6636        __struct.weight = buf.get_u16_le()?;
6637        __struct.id = buf.get_u8()?;
6638        let tmp = buf.get_u8()?;
6639        __struct.battery_function =
6640            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6641                enum_type: "MavBatteryFunction",
6642                value: tmp as u64,
6643            })?;
6644        let tmp = buf.get_u8()?;
6645        __struct.mavtype =
6646            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6647                enum_type: "MavBatteryType",
6648                value: tmp as u64,
6649            })?;
6650        __struct.state_of_health = buf.get_u8()?;
6651        __struct.cells_in_series = buf.get_u8()?;
6652        let mut tmp = [0_u8; 9usize];
6653        for v in &mut tmp {
6654            *v = buf.get_u8()?;
6655        }
6656        __struct.manufacture_date = CharArray::new(tmp);
6657        let mut tmp = [0_u8; 32usize];
6658        for v in &mut tmp {
6659            *v = buf.get_u8()?;
6660        }
6661        __struct.serial_number = CharArray::new(tmp);
6662        let mut tmp = [0_u8; 50usize];
6663        for v in &mut tmp {
6664            *v = buf.get_u8()?;
6665        }
6666        __struct.name = CharArray::new(tmp);
6667        Ok(__struct)
6668    }
6669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6670        let mut __tmp = BytesMut::new(bytes);
6671        #[allow(clippy::absurd_extreme_comparisons)]
6672        #[allow(unused_comparisons)]
6673        if __tmp.remaining() < Self::ENCODED_LEN {
6674            panic!(
6675                "buffer is too small (need {} bytes, but got {})",
6676                Self::ENCODED_LEN,
6677                __tmp.remaining(),
6678            )
6679        }
6680        __tmp.put_f32_le(self.discharge_minimum_voltage);
6681        __tmp.put_f32_le(self.charging_minimum_voltage);
6682        __tmp.put_f32_le(self.resting_minimum_voltage);
6683        __tmp.put_f32_le(self.charging_maximum_voltage);
6684        __tmp.put_f32_le(self.charging_maximum_current);
6685        __tmp.put_f32_le(self.nominal_voltage);
6686        __tmp.put_f32_le(self.discharge_maximum_current);
6687        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6688        __tmp.put_f32_le(self.design_capacity);
6689        __tmp.put_f32_le(self.full_charge_capacity);
6690        __tmp.put_u16_le(self.cycle_count);
6691        __tmp.put_u16_le(self.weight);
6692        __tmp.put_u8(self.id);
6693        __tmp.put_u8(self.battery_function as u8);
6694        __tmp.put_u8(self.mavtype as u8);
6695        __tmp.put_u8(self.state_of_health);
6696        __tmp.put_u8(self.cells_in_series);
6697        for val in &self.manufacture_date {
6698            __tmp.put_u8(*val);
6699        }
6700        for val in &self.serial_number {
6701            __tmp.put_u8(*val);
6702        }
6703        for val in &self.name {
6704            __tmp.put_u8(*val);
6705        }
6706        if matches!(version, MavlinkVersion::V2) {
6707            let len = __tmp.len();
6708            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6709        } else {
6710            __tmp.len()
6711        }
6712    }
6713}
6714#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6715#[doc = ""]
6716#[doc = "ID: 147"]
6717#[derive(Debug, Clone, PartialEq)]
6718#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6719#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6720#[cfg_attr(feature = "ts", derive(TS))]
6721#[cfg_attr(feature = "ts", ts(export))]
6722pub struct BATTERY_STATUS_DATA {
6723    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6724    pub current_consumed: i32,
6725    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6726    pub energy_consumed: i32,
6727    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6728    pub temperature: i16,
6729    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6730    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6731    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6732    pub voltages: [u16; 10],
6733    #[doc = "Battery current, -1: autopilot does not measure the current"]
6734    pub current_battery: i16,
6735    #[doc = "Battery ID"]
6736    pub id: u8,
6737    #[doc = "Function of the battery"]
6738    pub battery_function: MavBatteryFunction,
6739    #[doc = "Type (chemistry) of the battery"]
6740    pub mavtype: MavBatteryType,
6741    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6742    pub battery_remaining: i8,
6743    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6744    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6745    pub time_remaining: i32,
6746    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6747    #[cfg_attr(feature = "serde", serde(default))]
6748    pub charge_state: MavBatteryChargeState,
6749    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6750    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6751    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6752    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6753    pub voltages_ext: [u16; 4],
6754    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6755    #[cfg_attr(feature = "serde", serde(default))]
6756    pub mode: MavBatteryMode,
6757    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6758    #[cfg_attr(feature = "serde", serde(default))]
6759    pub fault_bitmask: MavBatteryFault,
6760}
6761impl BATTERY_STATUS_DATA {
6762    pub const ENCODED_LEN: usize = 54usize;
6763    pub const DEFAULT: Self = Self {
6764        current_consumed: 0_i32,
6765        energy_consumed: 0_i32,
6766        temperature: 0_i16,
6767        voltages: [0_u16; 10usize],
6768        current_battery: 0_i16,
6769        id: 0_u8,
6770        battery_function: MavBatteryFunction::DEFAULT,
6771        mavtype: MavBatteryType::DEFAULT,
6772        battery_remaining: 0_i8,
6773        time_remaining: 0_i32,
6774        charge_state: MavBatteryChargeState::DEFAULT,
6775        voltages_ext: [0_u16; 4usize],
6776        mode: MavBatteryMode::DEFAULT,
6777        fault_bitmask: MavBatteryFault::DEFAULT,
6778    };
6779    #[cfg(feature = "arbitrary")]
6780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6781        use arbitrary::{Arbitrary, Unstructured};
6782        let mut buf = [0u8; 1024];
6783        rng.fill_bytes(&mut buf);
6784        let mut unstructured = Unstructured::new(&buf);
6785        Self::arbitrary(&mut unstructured).unwrap_or_default()
6786    }
6787}
6788impl Default for BATTERY_STATUS_DATA {
6789    fn default() -> Self {
6790        Self::DEFAULT.clone()
6791    }
6792}
6793impl MessageData for BATTERY_STATUS_DATA {
6794    type Message = MavMessage;
6795    const ID: u32 = 147u32;
6796    const NAME: &'static str = "BATTERY_STATUS";
6797    const EXTRA_CRC: u8 = 154u8;
6798    const ENCODED_LEN: usize = 54usize;
6799    fn deser(
6800        _version: MavlinkVersion,
6801        __input: &[u8],
6802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6803        let avail_len = __input.len();
6804        let mut payload_buf = [0; Self::ENCODED_LEN];
6805        let mut buf = if avail_len < Self::ENCODED_LEN {
6806            payload_buf[0..avail_len].copy_from_slice(__input);
6807            Bytes::new(&payload_buf)
6808        } else {
6809            Bytes::new(__input)
6810        };
6811        let mut __struct = Self::default();
6812        __struct.current_consumed = buf.get_i32_le()?;
6813        __struct.energy_consumed = buf.get_i32_le()?;
6814        __struct.temperature = buf.get_i16_le()?;
6815        for v in &mut __struct.voltages {
6816            let val = buf.get_u16_le()?;
6817            *v = val;
6818        }
6819        __struct.current_battery = buf.get_i16_le()?;
6820        __struct.id = buf.get_u8()?;
6821        let tmp = buf.get_u8()?;
6822        __struct.battery_function =
6823            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6824                enum_type: "MavBatteryFunction",
6825                value: tmp as u64,
6826            })?;
6827        let tmp = buf.get_u8()?;
6828        __struct.mavtype =
6829            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6830                enum_type: "MavBatteryType",
6831                value: tmp as u64,
6832            })?;
6833        __struct.battery_remaining = buf.get_i8()?;
6834        __struct.time_remaining = buf.get_i32_le()?;
6835        let tmp = buf.get_u8()?;
6836        __struct.charge_state =
6837            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6838                enum_type: "MavBatteryChargeState",
6839                value: tmp as u64,
6840            })?;
6841        for v in &mut __struct.voltages_ext {
6842            let val = buf.get_u16_le()?;
6843            *v = val;
6844        }
6845        let tmp = buf.get_u8()?;
6846        __struct.mode =
6847            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6848                enum_type: "MavBatteryMode",
6849                value: tmp as u64,
6850            })?;
6851        let tmp = buf.get_u32_le()?;
6852        __struct.fault_bitmask = MavBatteryFault::from_bits(
6853            tmp as <MavBatteryFault as Flags>::Bits,
6854        )
6855        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6856            flag_type: "MavBatteryFault",
6857            value: tmp as u64,
6858        })?;
6859        Ok(__struct)
6860    }
6861    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6862        let mut __tmp = BytesMut::new(bytes);
6863        #[allow(clippy::absurd_extreme_comparisons)]
6864        #[allow(unused_comparisons)]
6865        if __tmp.remaining() < Self::ENCODED_LEN {
6866            panic!(
6867                "buffer is too small (need {} bytes, but got {})",
6868                Self::ENCODED_LEN,
6869                __tmp.remaining(),
6870            )
6871        }
6872        __tmp.put_i32_le(self.current_consumed);
6873        __tmp.put_i32_le(self.energy_consumed);
6874        __tmp.put_i16_le(self.temperature);
6875        for val in &self.voltages {
6876            __tmp.put_u16_le(*val);
6877        }
6878        __tmp.put_i16_le(self.current_battery);
6879        __tmp.put_u8(self.id);
6880        __tmp.put_u8(self.battery_function as u8);
6881        __tmp.put_u8(self.mavtype as u8);
6882        __tmp.put_i8(self.battery_remaining);
6883        if matches!(version, MavlinkVersion::V2) {
6884            __tmp.put_i32_le(self.time_remaining);
6885            __tmp.put_u8(self.charge_state as u8);
6886            for val in &self.voltages_ext {
6887                __tmp.put_u16_le(*val);
6888            }
6889            __tmp.put_u8(self.mode as u8);
6890            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
6891            let len = __tmp.len();
6892            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6893        } else {
6894            __tmp.len()
6895        }
6896    }
6897}
6898#[doc = "Report button state change."]
6899#[doc = ""]
6900#[doc = "ID: 257"]
6901#[derive(Debug, Clone, PartialEq)]
6902#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6903#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6904#[cfg_attr(feature = "ts", derive(TS))]
6905#[cfg_attr(feature = "ts", ts(export))]
6906pub struct BUTTON_CHANGE_DATA {
6907    #[doc = "Timestamp (time since system boot)."]
6908    pub time_boot_ms: u32,
6909    #[doc = "Time of last change of button state."]
6910    pub last_change_ms: u32,
6911    #[doc = "Bitmap for state of buttons."]
6912    pub state: u8,
6913}
6914impl BUTTON_CHANGE_DATA {
6915    pub const ENCODED_LEN: usize = 9usize;
6916    pub const DEFAULT: Self = Self {
6917        time_boot_ms: 0_u32,
6918        last_change_ms: 0_u32,
6919        state: 0_u8,
6920    };
6921    #[cfg(feature = "arbitrary")]
6922    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6923        use arbitrary::{Arbitrary, Unstructured};
6924        let mut buf = [0u8; 1024];
6925        rng.fill_bytes(&mut buf);
6926        let mut unstructured = Unstructured::new(&buf);
6927        Self::arbitrary(&mut unstructured).unwrap_or_default()
6928    }
6929}
6930impl Default for BUTTON_CHANGE_DATA {
6931    fn default() -> Self {
6932        Self::DEFAULT.clone()
6933    }
6934}
6935impl MessageData for BUTTON_CHANGE_DATA {
6936    type Message = MavMessage;
6937    const ID: u32 = 257u32;
6938    const NAME: &'static str = "BUTTON_CHANGE";
6939    const EXTRA_CRC: u8 = 131u8;
6940    const ENCODED_LEN: usize = 9usize;
6941    fn deser(
6942        _version: MavlinkVersion,
6943        __input: &[u8],
6944    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6945        let avail_len = __input.len();
6946        let mut payload_buf = [0; Self::ENCODED_LEN];
6947        let mut buf = if avail_len < Self::ENCODED_LEN {
6948            payload_buf[0..avail_len].copy_from_slice(__input);
6949            Bytes::new(&payload_buf)
6950        } else {
6951            Bytes::new(__input)
6952        };
6953        let mut __struct = Self::default();
6954        __struct.time_boot_ms = buf.get_u32_le()?;
6955        __struct.last_change_ms = buf.get_u32_le()?;
6956        __struct.state = buf.get_u8()?;
6957        Ok(__struct)
6958    }
6959    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6960        let mut __tmp = BytesMut::new(bytes);
6961        #[allow(clippy::absurd_extreme_comparisons)]
6962        #[allow(unused_comparisons)]
6963        if __tmp.remaining() < Self::ENCODED_LEN {
6964            panic!(
6965                "buffer is too small (need {} bytes, but got {})",
6966                Self::ENCODED_LEN,
6967                __tmp.remaining(),
6968            )
6969        }
6970        __tmp.put_u32_le(self.time_boot_ms);
6971        __tmp.put_u32_le(self.last_change_ms);
6972        __tmp.put_u8(self.state);
6973        if matches!(version, MavlinkVersion::V2) {
6974            let len = __tmp.len();
6975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6976        } else {
6977            __tmp.len()
6978        }
6979    }
6980}
6981#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6982#[doc = ""]
6983#[doc = "ID: 262"]
6984#[derive(Debug, Clone, PartialEq)]
6985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6987#[cfg_attr(feature = "ts", derive(TS))]
6988#[cfg_attr(feature = "ts", ts(export))]
6989pub struct CAMERA_CAPTURE_STATUS_DATA {
6990    #[doc = "Timestamp (time since system boot)."]
6991    pub time_boot_ms: u32,
6992    #[doc = "Image capture interval"]
6993    pub image_interval: f32,
6994    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6995    pub recording_time_ms: u32,
6996    #[doc = "Available storage capacity."]
6997    pub available_capacity: f32,
6998    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6999    pub image_status: u8,
7000    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7001    pub video_status: u8,
7002    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7003    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7004    pub image_count: i32,
7005    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7006    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7007    pub camera_device_id: u8,
7008}
7009impl CAMERA_CAPTURE_STATUS_DATA {
7010    pub const ENCODED_LEN: usize = 23usize;
7011    pub const DEFAULT: Self = Self {
7012        time_boot_ms: 0_u32,
7013        image_interval: 0.0_f32,
7014        recording_time_ms: 0_u32,
7015        available_capacity: 0.0_f32,
7016        image_status: 0_u8,
7017        video_status: 0_u8,
7018        image_count: 0_i32,
7019        camera_device_id: 0_u8,
7020    };
7021    #[cfg(feature = "arbitrary")]
7022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7023        use arbitrary::{Arbitrary, Unstructured};
7024        let mut buf = [0u8; 1024];
7025        rng.fill_bytes(&mut buf);
7026        let mut unstructured = Unstructured::new(&buf);
7027        Self::arbitrary(&mut unstructured).unwrap_or_default()
7028    }
7029}
7030impl Default for CAMERA_CAPTURE_STATUS_DATA {
7031    fn default() -> Self {
7032        Self::DEFAULT.clone()
7033    }
7034}
7035impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7036    type Message = MavMessage;
7037    const ID: u32 = 262u32;
7038    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7039    const EXTRA_CRC: u8 = 12u8;
7040    const ENCODED_LEN: usize = 23usize;
7041    fn deser(
7042        _version: MavlinkVersion,
7043        __input: &[u8],
7044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7045        let avail_len = __input.len();
7046        let mut payload_buf = [0; Self::ENCODED_LEN];
7047        let mut buf = if avail_len < Self::ENCODED_LEN {
7048            payload_buf[0..avail_len].copy_from_slice(__input);
7049            Bytes::new(&payload_buf)
7050        } else {
7051            Bytes::new(__input)
7052        };
7053        let mut __struct = Self::default();
7054        __struct.time_boot_ms = buf.get_u32_le()?;
7055        __struct.image_interval = buf.get_f32_le()?;
7056        __struct.recording_time_ms = buf.get_u32_le()?;
7057        __struct.available_capacity = buf.get_f32_le()?;
7058        __struct.image_status = buf.get_u8()?;
7059        __struct.video_status = buf.get_u8()?;
7060        __struct.image_count = buf.get_i32_le()?;
7061        __struct.camera_device_id = buf.get_u8()?;
7062        Ok(__struct)
7063    }
7064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7065        let mut __tmp = BytesMut::new(bytes);
7066        #[allow(clippy::absurd_extreme_comparisons)]
7067        #[allow(unused_comparisons)]
7068        if __tmp.remaining() < Self::ENCODED_LEN {
7069            panic!(
7070                "buffer is too small (need {} bytes, but got {})",
7071                Self::ENCODED_LEN,
7072                __tmp.remaining(),
7073            )
7074        }
7075        __tmp.put_u32_le(self.time_boot_ms);
7076        __tmp.put_f32_le(self.image_interval);
7077        __tmp.put_u32_le(self.recording_time_ms);
7078        __tmp.put_f32_le(self.available_capacity);
7079        __tmp.put_u8(self.image_status);
7080        __tmp.put_u8(self.video_status);
7081        if matches!(version, MavlinkVersion::V2) {
7082            __tmp.put_i32_le(self.image_count);
7083            __tmp.put_u8(self.camera_device_id);
7084            let len = __tmp.len();
7085            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7086        } else {
7087            __tmp.len()
7088        }
7089    }
7090}
7091#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7092#[doc = ""]
7093#[doc = "ID: 271"]
7094#[derive(Debug, Clone, PartialEq)]
7095#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7096#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7097#[cfg_attr(feature = "ts", derive(TS))]
7098#[cfg_attr(feature = "ts", ts(export))]
7099pub struct CAMERA_FOV_STATUS_DATA {
7100    #[doc = "Timestamp (time since system boot)."]
7101    pub time_boot_ms: u32,
7102    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7103    pub lat_camera: i32,
7104    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7105    pub lon_camera: i32,
7106    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7107    pub alt_camera: i32,
7108    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7109    pub lat_image: i32,
7110    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7111    pub lon_image: i32,
7112    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7113    pub alt_image: i32,
7114    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7115    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7116    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7117    pub q: [f32; 4],
7118    #[doc = "Horizontal field of view (NaN if unknown)."]
7119    pub hfov: f32,
7120    #[doc = "Vertical field of view (NaN if unknown)."]
7121    pub vfov: f32,
7122    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7123    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7124    pub camera_device_id: u8,
7125}
7126impl CAMERA_FOV_STATUS_DATA {
7127    pub const ENCODED_LEN: usize = 53usize;
7128    pub const DEFAULT: Self = Self {
7129        time_boot_ms: 0_u32,
7130        lat_camera: 0_i32,
7131        lon_camera: 0_i32,
7132        alt_camera: 0_i32,
7133        lat_image: 0_i32,
7134        lon_image: 0_i32,
7135        alt_image: 0_i32,
7136        q: [0.0_f32; 4usize],
7137        hfov: 0.0_f32,
7138        vfov: 0.0_f32,
7139        camera_device_id: 0_u8,
7140    };
7141    #[cfg(feature = "arbitrary")]
7142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7143        use arbitrary::{Arbitrary, Unstructured};
7144        let mut buf = [0u8; 1024];
7145        rng.fill_bytes(&mut buf);
7146        let mut unstructured = Unstructured::new(&buf);
7147        Self::arbitrary(&mut unstructured).unwrap_or_default()
7148    }
7149}
7150impl Default for CAMERA_FOV_STATUS_DATA {
7151    fn default() -> Self {
7152        Self::DEFAULT.clone()
7153    }
7154}
7155impl MessageData for CAMERA_FOV_STATUS_DATA {
7156    type Message = MavMessage;
7157    const ID: u32 = 271u32;
7158    const NAME: &'static str = "CAMERA_FOV_STATUS";
7159    const EXTRA_CRC: u8 = 22u8;
7160    const ENCODED_LEN: usize = 53usize;
7161    fn deser(
7162        _version: MavlinkVersion,
7163        __input: &[u8],
7164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7165        let avail_len = __input.len();
7166        let mut payload_buf = [0; Self::ENCODED_LEN];
7167        let mut buf = if avail_len < Self::ENCODED_LEN {
7168            payload_buf[0..avail_len].copy_from_slice(__input);
7169            Bytes::new(&payload_buf)
7170        } else {
7171            Bytes::new(__input)
7172        };
7173        let mut __struct = Self::default();
7174        __struct.time_boot_ms = buf.get_u32_le()?;
7175        __struct.lat_camera = buf.get_i32_le()?;
7176        __struct.lon_camera = buf.get_i32_le()?;
7177        __struct.alt_camera = buf.get_i32_le()?;
7178        __struct.lat_image = buf.get_i32_le()?;
7179        __struct.lon_image = buf.get_i32_le()?;
7180        __struct.alt_image = buf.get_i32_le()?;
7181        for v in &mut __struct.q {
7182            let val = buf.get_f32_le()?;
7183            *v = val;
7184        }
7185        __struct.hfov = buf.get_f32_le()?;
7186        __struct.vfov = buf.get_f32_le()?;
7187        __struct.camera_device_id = buf.get_u8()?;
7188        Ok(__struct)
7189    }
7190    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7191        let mut __tmp = BytesMut::new(bytes);
7192        #[allow(clippy::absurd_extreme_comparisons)]
7193        #[allow(unused_comparisons)]
7194        if __tmp.remaining() < Self::ENCODED_LEN {
7195            panic!(
7196                "buffer is too small (need {} bytes, but got {})",
7197                Self::ENCODED_LEN,
7198                __tmp.remaining(),
7199            )
7200        }
7201        __tmp.put_u32_le(self.time_boot_ms);
7202        __tmp.put_i32_le(self.lat_camera);
7203        __tmp.put_i32_le(self.lon_camera);
7204        __tmp.put_i32_le(self.alt_camera);
7205        __tmp.put_i32_le(self.lat_image);
7206        __tmp.put_i32_le(self.lon_image);
7207        __tmp.put_i32_le(self.alt_image);
7208        for val in &self.q {
7209            __tmp.put_f32_le(*val);
7210        }
7211        __tmp.put_f32_le(self.hfov);
7212        __tmp.put_f32_le(self.vfov);
7213        if matches!(version, MavlinkVersion::V2) {
7214            __tmp.put_u8(self.camera_device_id);
7215            let len = __tmp.len();
7216            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7217        } else {
7218            __tmp.len()
7219        }
7220    }
7221}
7222#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7223#[doc = ""]
7224#[doc = "ID: 263"]
7225#[derive(Debug, Clone, PartialEq)]
7226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7228#[cfg_attr(feature = "ts", derive(TS))]
7229#[cfg_attr(feature = "ts", ts(export))]
7230pub struct CAMERA_IMAGE_CAPTURED_DATA {
7231    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7232    pub time_utc: u64,
7233    #[doc = "Timestamp (time since system boot)."]
7234    pub time_boot_ms: u32,
7235    #[doc = "Latitude where image was taken"]
7236    pub lat: i32,
7237    #[doc = "Longitude where capture was taken"]
7238    pub lon: i32,
7239    #[doc = "Altitude (MSL) where image was taken"]
7240    pub alt: i32,
7241    #[doc = "Altitude above ground"]
7242    pub relative_alt: i32,
7243    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7245    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7246    pub q: [f32; 4],
7247    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7248    pub image_index: i32,
7249    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7250    pub camera_id: u8,
7251    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7252    pub capture_result: i8,
7253    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7254    #[cfg_attr(feature = "ts", ts(type = "string"))]
7255    pub file_url: CharArray<205>,
7256}
7257impl CAMERA_IMAGE_CAPTURED_DATA {
7258    pub const ENCODED_LEN: usize = 255usize;
7259    pub const DEFAULT: Self = Self {
7260        time_utc: 0_u64,
7261        time_boot_ms: 0_u32,
7262        lat: 0_i32,
7263        lon: 0_i32,
7264        alt: 0_i32,
7265        relative_alt: 0_i32,
7266        q: [0.0_f32; 4usize],
7267        image_index: 0_i32,
7268        camera_id: 0_u8,
7269        capture_result: 0_i8,
7270        file_url: CharArray::new([0_u8; 205usize]),
7271    };
7272    #[cfg(feature = "arbitrary")]
7273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7274        use arbitrary::{Arbitrary, Unstructured};
7275        let mut buf = [0u8; 1024];
7276        rng.fill_bytes(&mut buf);
7277        let mut unstructured = Unstructured::new(&buf);
7278        Self::arbitrary(&mut unstructured).unwrap_or_default()
7279    }
7280}
7281impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7282    fn default() -> Self {
7283        Self::DEFAULT.clone()
7284    }
7285}
7286impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7287    type Message = MavMessage;
7288    const ID: u32 = 263u32;
7289    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7290    const EXTRA_CRC: u8 = 133u8;
7291    const ENCODED_LEN: usize = 255usize;
7292    fn deser(
7293        _version: MavlinkVersion,
7294        __input: &[u8],
7295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7296        let avail_len = __input.len();
7297        let mut payload_buf = [0; Self::ENCODED_LEN];
7298        let mut buf = if avail_len < Self::ENCODED_LEN {
7299            payload_buf[0..avail_len].copy_from_slice(__input);
7300            Bytes::new(&payload_buf)
7301        } else {
7302            Bytes::new(__input)
7303        };
7304        let mut __struct = Self::default();
7305        __struct.time_utc = buf.get_u64_le()?;
7306        __struct.time_boot_ms = buf.get_u32_le()?;
7307        __struct.lat = buf.get_i32_le()?;
7308        __struct.lon = buf.get_i32_le()?;
7309        __struct.alt = buf.get_i32_le()?;
7310        __struct.relative_alt = buf.get_i32_le()?;
7311        for v in &mut __struct.q {
7312            let val = buf.get_f32_le()?;
7313            *v = val;
7314        }
7315        __struct.image_index = buf.get_i32_le()?;
7316        __struct.camera_id = buf.get_u8()?;
7317        __struct.capture_result = buf.get_i8()?;
7318        let mut tmp = [0_u8; 205usize];
7319        for v in &mut tmp {
7320            *v = buf.get_u8()?;
7321        }
7322        __struct.file_url = CharArray::new(tmp);
7323        Ok(__struct)
7324    }
7325    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7326        let mut __tmp = BytesMut::new(bytes);
7327        #[allow(clippy::absurd_extreme_comparisons)]
7328        #[allow(unused_comparisons)]
7329        if __tmp.remaining() < Self::ENCODED_LEN {
7330            panic!(
7331                "buffer is too small (need {} bytes, but got {})",
7332                Self::ENCODED_LEN,
7333                __tmp.remaining(),
7334            )
7335        }
7336        __tmp.put_u64_le(self.time_utc);
7337        __tmp.put_u32_le(self.time_boot_ms);
7338        __tmp.put_i32_le(self.lat);
7339        __tmp.put_i32_le(self.lon);
7340        __tmp.put_i32_le(self.alt);
7341        __tmp.put_i32_le(self.relative_alt);
7342        for val in &self.q {
7343            __tmp.put_f32_le(*val);
7344        }
7345        __tmp.put_i32_le(self.image_index);
7346        __tmp.put_u8(self.camera_id);
7347        __tmp.put_i8(self.capture_result);
7348        for val in &self.file_url {
7349            __tmp.put_u8(*val);
7350        }
7351        if matches!(version, MavlinkVersion::V2) {
7352            let len = __tmp.len();
7353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7354        } else {
7355            __tmp.len()
7356        }
7357    }
7358}
7359#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7360#[doc = ""]
7361#[doc = "ID: 259"]
7362#[derive(Debug, Clone, PartialEq)]
7363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7365#[cfg_attr(feature = "ts", derive(TS))]
7366#[cfg_attr(feature = "ts", ts(export))]
7367pub struct CAMERA_INFORMATION_DATA {
7368    #[doc = "Timestamp (time since system boot)."]
7369    pub time_boot_ms: u32,
7370    #[doc = "0xff). Use 0 if not known."]
7371    pub firmware_version: u32,
7372    #[doc = "Focal length. Use NaN if not known."]
7373    pub focal_length: f32,
7374    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7375    pub sensor_size_h: f32,
7376    #[doc = "Image sensor size vertical. Use NaN if not known."]
7377    pub sensor_size_v: f32,
7378    #[doc = "Bitmap of camera capability flags."]
7379    pub flags: CameraCapFlags,
7380    #[doc = "Horizontal image resolution. Use 0 if not known."]
7381    pub resolution_h: u16,
7382    #[doc = "Vertical image resolution. Use 0 if not known."]
7383    pub resolution_v: u16,
7384    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7385    pub cam_definition_version: u16,
7386    #[doc = "Name of the camera vendor"]
7387    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7388    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7389    pub vendor_name: [u8; 32],
7390    #[doc = "Name of the camera model"]
7391    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7392    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7393    pub model_name: [u8; 32],
7394    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7395    pub lens_id: u8,
7396    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7397    #[cfg_attr(feature = "ts", ts(type = "string"))]
7398    pub cam_definition_uri: CharArray<140>,
7399    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7400    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7401    pub gimbal_device_id: u8,
7402    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7404    pub camera_device_id: u8,
7405}
7406impl CAMERA_INFORMATION_DATA {
7407    pub const ENCODED_LEN: usize = 237usize;
7408    pub const DEFAULT: Self = Self {
7409        time_boot_ms: 0_u32,
7410        firmware_version: 0_u32,
7411        focal_length: 0.0_f32,
7412        sensor_size_h: 0.0_f32,
7413        sensor_size_v: 0.0_f32,
7414        flags: CameraCapFlags::DEFAULT,
7415        resolution_h: 0_u16,
7416        resolution_v: 0_u16,
7417        cam_definition_version: 0_u16,
7418        vendor_name: [0_u8; 32usize],
7419        model_name: [0_u8; 32usize],
7420        lens_id: 0_u8,
7421        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7422        gimbal_device_id: 0_u8,
7423        camera_device_id: 0_u8,
7424    };
7425    #[cfg(feature = "arbitrary")]
7426    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7427        use arbitrary::{Arbitrary, Unstructured};
7428        let mut buf = [0u8; 1024];
7429        rng.fill_bytes(&mut buf);
7430        let mut unstructured = Unstructured::new(&buf);
7431        Self::arbitrary(&mut unstructured).unwrap_or_default()
7432    }
7433}
7434impl Default for CAMERA_INFORMATION_DATA {
7435    fn default() -> Self {
7436        Self::DEFAULT.clone()
7437    }
7438}
7439impl MessageData for CAMERA_INFORMATION_DATA {
7440    type Message = MavMessage;
7441    const ID: u32 = 259u32;
7442    const NAME: &'static str = "CAMERA_INFORMATION";
7443    const EXTRA_CRC: u8 = 92u8;
7444    const ENCODED_LEN: usize = 237usize;
7445    fn deser(
7446        _version: MavlinkVersion,
7447        __input: &[u8],
7448    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7449        let avail_len = __input.len();
7450        let mut payload_buf = [0; Self::ENCODED_LEN];
7451        let mut buf = if avail_len < Self::ENCODED_LEN {
7452            payload_buf[0..avail_len].copy_from_slice(__input);
7453            Bytes::new(&payload_buf)
7454        } else {
7455            Bytes::new(__input)
7456        };
7457        let mut __struct = Self::default();
7458        __struct.time_boot_ms = buf.get_u32_le()?;
7459        __struct.firmware_version = buf.get_u32_le()?;
7460        __struct.focal_length = buf.get_f32_le()?;
7461        __struct.sensor_size_h = buf.get_f32_le()?;
7462        __struct.sensor_size_v = buf.get_f32_le()?;
7463        let tmp = buf.get_u32_le()?;
7464        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7465            ::mavlink_core::error::ParserError::InvalidFlag {
7466                flag_type: "CameraCapFlags",
7467                value: tmp as u64,
7468            },
7469        )?;
7470        __struct.resolution_h = buf.get_u16_le()?;
7471        __struct.resolution_v = buf.get_u16_le()?;
7472        __struct.cam_definition_version = buf.get_u16_le()?;
7473        for v in &mut __struct.vendor_name {
7474            let val = buf.get_u8()?;
7475            *v = val;
7476        }
7477        for v in &mut __struct.model_name {
7478            let val = buf.get_u8()?;
7479            *v = val;
7480        }
7481        __struct.lens_id = buf.get_u8()?;
7482        let mut tmp = [0_u8; 140usize];
7483        for v in &mut tmp {
7484            *v = buf.get_u8()?;
7485        }
7486        __struct.cam_definition_uri = CharArray::new(tmp);
7487        __struct.gimbal_device_id = buf.get_u8()?;
7488        __struct.camera_device_id = buf.get_u8()?;
7489        Ok(__struct)
7490    }
7491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7492        let mut __tmp = BytesMut::new(bytes);
7493        #[allow(clippy::absurd_extreme_comparisons)]
7494        #[allow(unused_comparisons)]
7495        if __tmp.remaining() < Self::ENCODED_LEN {
7496            panic!(
7497                "buffer is too small (need {} bytes, but got {})",
7498                Self::ENCODED_LEN,
7499                __tmp.remaining(),
7500            )
7501        }
7502        __tmp.put_u32_le(self.time_boot_ms);
7503        __tmp.put_u32_le(self.firmware_version);
7504        __tmp.put_f32_le(self.focal_length);
7505        __tmp.put_f32_le(self.sensor_size_h);
7506        __tmp.put_f32_le(self.sensor_size_v);
7507        __tmp.put_u32_le(self.flags.bits() as u32);
7508        __tmp.put_u16_le(self.resolution_h);
7509        __tmp.put_u16_le(self.resolution_v);
7510        __tmp.put_u16_le(self.cam_definition_version);
7511        for val in &self.vendor_name {
7512            __tmp.put_u8(*val);
7513        }
7514        for val in &self.model_name {
7515            __tmp.put_u8(*val);
7516        }
7517        __tmp.put_u8(self.lens_id);
7518        for val in &self.cam_definition_uri {
7519            __tmp.put_u8(*val);
7520        }
7521        if matches!(version, MavlinkVersion::V2) {
7522            __tmp.put_u8(self.gimbal_device_id);
7523            __tmp.put_u8(self.camera_device_id);
7524            let len = __tmp.len();
7525            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7526        } else {
7527            __tmp.len()
7528        }
7529    }
7530}
7531#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7532#[doc = ""]
7533#[doc = "ID: 260"]
7534#[derive(Debug, Clone, PartialEq)]
7535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7537#[cfg_attr(feature = "ts", derive(TS))]
7538#[cfg_attr(feature = "ts", ts(export))]
7539pub struct CAMERA_SETTINGS_DATA {
7540    #[doc = "Timestamp (time since system boot)."]
7541    pub time_boot_ms: u32,
7542    #[doc = "Camera mode"]
7543    pub mode_id: CameraMode,
7544    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7545    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7546    pub zoomLevel: f32,
7547    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7548    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7549    pub focusLevel: f32,
7550    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7551    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7552    pub camera_device_id: u8,
7553}
7554impl CAMERA_SETTINGS_DATA {
7555    pub const ENCODED_LEN: usize = 14usize;
7556    pub const DEFAULT: Self = Self {
7557        time_boot_ms: 0_u32,
7558        mode_id: CameraMode::DEFAULT,
7559        zoomLevel: 0.0_f32,
7560        focusLevel: 0.0_f32,
7561        camera_device_id: 0_u8,
7562    };
7563    #[cfg(feature = "arbitrary")]
7564    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7565        use arbitrary::{Arbitrary, Unstructured};
7566        let mut buf = [0u8; 1024];
7567        rng.fill_bytes(&mut buf);
7568        let mut unstructured = Unstructured::new(&buf);
7569        Self::arbitrary(&mut unstructured).unwrap_or_default()
7570    }
7571}
7572impl Default for CAMERA_SETTINGS_DATA {
7573    fn default() -> Self {
7574        Self::DEFAULT.clone()
7575    }
7576}
7577impl MessageData for CAMERA_SETTINGS_DATA {
7578    type Message = MavMessage;
7579    const ID: u32 = 260u32;
7580    const NAME: &'static str = "CAMERA_SETTINGS";
7581    const EXTRA_CRC: u8 = 146u8;
7582    const ENCODED_LEN: usize = 14usize;
7583    fn deser(
7584        _version: MavlinkVersion,
7585        __input: &[u8],
7586    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7587        let avail_len = __input.len();
7588        let mut payload_buf = [0; Self::ENCODED_LEN];
7589        let mut buf = if avail_len < Self::ENCODED_LEN {
7590            payload_buf[0..avail_len].copy_from_slice(__input);
7591            Bytes::new(&payload_buf)
7592        } else {
7593            Bytes::new(__input)
7594        };
7595        let mut __struct = Self::default();
7596        __struct.time_boot_ms = buf.get_u32_le()?;
7597        let tmp = buf.get_u8()?;
7598        __struct.mode_id =
7599            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7600                enum_type: "CameraMode",
7601                value: tmp as u64,
7602            })?;
7603        __struct.zoomLevel = buf.get_f32_le()?;
7604        __struct.focusLevel = buf.get_f32_le()?;
7605        __struct.camera_device_id = buf.get_u8()?;
7606        Ok(__struct)
7607    }
7608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7609        let mut __tmp = BytesMut::new(bytes);
7610        #[allow(clippy::absurd_extreme_comparisons)]
7611        #[allow(unused_comparisons)]
7612        if __tmp.remaining() < Self::ENCODED_LEN {
7613            panic!(
7614                "buffer is too small (need {} bytes, but got {})",
7615                Self::ENCODED_LEN,
7616                __tmp.remaining(),
7617            )
7618        }
7619        __tmp.put_u32_le(self.time_boot_ms);
7620        __tmp.put_u8(self.mode_id as u8);
7621        if matches!(version, MavlinkVersion::V2) {
7622            __tmp.put_f32_le(self.zoomLevel);
7623            __tmp.put_f32_le(self.focusLevel);
7624            __tmp.put_u8(self.camera_device_id);
7625            let len = __tmp.len();
7626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7627        } else {
7628            __tmp.len()
7629        }
7630    }
7631}
7632#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7633#[doc = ""]
7634#[doc = "ID: 277"]
7635#[derive(Debug, Clone, PartialEq)]
7636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7638#[cfg_attr(feature = "ts", derive(TS))]
7639#[cfg_attr(feature = "ts", ts(export))]
7640pub struct CAMERA_THERMAL_RANGE_DATA {
7641    #[doc = "Timestamp (time since system boot)."]
7642    pub time_boot_ms: u32,
7643    #[doc = "Temperature max."]
7644    pub max: f32,
7645    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7646    pub max_point_x: f32,
7647    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7648    pub max_point_y: f32,
7649    #[doc = "Temperature min."]
7650    pub min: f32,
7651    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7652    pub min_point_x: f32,
7653    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7654    pub min_point_y: f32,
7655    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7656    pub stream_id: u8,
7657    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7658    pub camera_device_id: u8,
7659}
7660impl CAMERA_THERMAL_RANGE_DATA {
7661    pub const ENCODED_LEN: usize = 30usize;
7662    pub const DEFAULT: Self = Self {
7663        time_boot_ms: 0_u32,
7664        max: 0.0_f32,
7665        max_point_x: 0.0_f32,
7666        max_point_y: 0.0_f32,
7667        min: 0.0_f32,
7668        min_point_x: 0.0_f32,
7669        min_point_y: 0.0_f32,
7670        stream_id: 0_u8,
7671        camera_device_id: 0_u8,
7672    };
7673    #[cfg(feature = "arbitrary")]
7674    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7675        use arbitrary::{Arbitrary, Unstructured};
7676        let mut buf = [0u8; 1024];
7677        rng.fill_bytes(&mut buf);
7678        let mut unstructured = Unstructured::new(&buf);
7679        Self::arbitrary(&mut unstructured).unwrap_or_default()
7680    }
7681}
7682impl Default for CAMERA_THERMAL_RANGE_DATA {
7683    fn default() -> Self {
7684        Self::DEFAULT.clone()
7685    }
7686}
7687impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7688    type Message = MavMessage;
7689    const ID: u32 = 277u32;
7690    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7691    const EXTRA_CRC: u8 = 62u8;
7692    const ENCODED_LEN: usize = 30usize;
7693    fn deser(
7694        _version: MavlinkVersion,
7695        __input: &[u8],
7696    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7697        let avail_len = __input.len();
7698        let mut payload_buf = [0; Self::ENCODED_LEN];
7699        let mut buf = if avail_len < Self::ENCODED_LEN {
7700            payload_buf[0..avail_len].copy_from_slice(__input);
7701            Bytes::new(&payload_buf)
7702        } else {
7703            Bytes::new(__input)
7704        };
7705        let mut __struct = Self::default();
7706        __struct.time_boot_ms = buf.get_u32_le()?;
7707        __struct.max = buf.get_f32_le()?;
7708        __struct.max_point_x = buf.get_f32_le()?;
7709        __struct.max_point_y = buf.get_f32_le()?;
7710        __struct.min = buf.get_f32_le()?;
7711        __struct.min_point_x = buf.get_f32_le()?;
7712        __struct.min_point_y = buf.get_f32_le()?;
7713        __struct.stream_id = buf.get_u8()?;
7714        __struct.camera_device_id = buf.get_u8()?;
7715        Ok(__struct)
7716    }
7717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7718        let mut __tmp = BytesMut::new(bytes);
7719        #[allow(clippy::absurd_extreme_comparisons)]
7720        #[allow(unused_comparisons)]
7721        if __tmp.remaining() < Self::ENCODED_LEN {
7722            panic!(
7723                "buffer is too small (need {} bytes, but got {})",
7724                Self::ENCODED_LEN,
7725                __tmp.remaining(),
7726            )
7727        }
7728        __tmp.put_u32_le(self.time_boot_ms);
7729        __tmp.put_f32_le(self.max);
7730        __tmp.put_f32_le(self.max_point_x);
7731        __tmp.put_f32_le(self.max_point_y);
7732        __tmp.put_f32_le(self.min);
7733        __tmp.put_f32_le(self.min_point_x);
7734        __tmp.put_f32_le(self.min_point_y);
7735        __tmp.put_u8(self.stream_id);
7736        __tmp.put_u8(self.camera_device_id);
7737        if matches!(version, MavlinkVersion::V2) {
7738            let len = __tmp.len();
7739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7740        } else {
7741            __tmp.len()
7742        }
7743    }
7744}
7745#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7746#[doc = ""]
7747#[doc = "ID: 276"]
7748#[derive(Debug, Clone, PartialEq)]
7749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7751#[cfg_attr(feature = "ts", derive(TS))]
7752#[cfg_attr(feature = "ts", ts(export))]
7753pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7754    #[doc = "Latitude of tracked object"]
7755    pub lat: i32,
7756    #[doc = "Longitude of tracked object"]
7757    pub lon: i32,
7758    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7759    pub alt: f32,
7760    #[doc = "Horizontal accuracy. NAN if unknown"]
7761    pub h_acc: f32,
7762    #[doc = "Vertical accuracy. NAN if unknown"]
7763    pub v_acc: f32,
7764    #[doc = "North velocity of tracked object. NAN if unknown"]
7765    pub vel_n: f32,
7766    #[doc = "East velocity of tracked object. NAN if unknown"]
7767    pub vel_e: f32,
7768    #[doc = "Down velocity of tracked object. NAN if unknown"]
7769    pub vel_d: f32,
7770    #[doc = "Velocity accuracy. NAN if unknown"]
7771    pub vel_acc: f32,
7772    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7773    pub dist: f32,
7774    #[doc = "Heading in radians, in NED. NAN if unknown"]
7775    pub hdg: f32,
7776    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7777    pub hdg_acc: f32,
7778    #[doc = "Current tracking status"]
7779    pub tracking_status: CameraTrackingStatusFlags,
7780    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7781    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7782    pub camera_device_id: u8,
7783}
7784impl CAMERA_TRACKING_GEO_STATUS_DATA {
7785    pub const ENCODED_LEN: usize = 50usize;
7786    pub const DEFAULT: Self = Self {
7787        lat: 0_i32,
7788        lon: 0_i32,
7789        alt: 0.0_f32,
7790        h_acc: 0.0_f32,
7791        v_acc: 0.0_f32,
7792        vel_n: 0.0_f32,
7793        vel_e: 0.0_f32,
7794        vel_d: 0.0_f32,
7795        vel_acc: 0.0_f32,
7796        dist: 0.0_f32,
7797        hdg: 0.0_f32,
7798        hdg_acc: 0.0_f32,
7799        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7800        camera_device_id: 0_u8,
7801    };
7802    #[cfg(feature = "arbitrary")]
7803    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7804        use arbitrary::{Arbitrary, Unstructured};
7805        let mut buf = [0u8; 1024];
7806        rng.fill_bytes(&mut buf);
7807        let mut unstructured = Unstructured::new(&buf);
7808        Self::arbitrary(&mut unstructured).unwrap_or_default()
7809    }
7810}
7811impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7812    fn default() -> Self {
7813        Self::DEFAULT.clone()
7814    }
7815}
7816impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7817    type Message = MavMessage;
7818    const ID: u32 = 276u32;
7819    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7820    const EXTRA_CRC: u8 = 18u8;
7821    const ENCODED_LEN: usize = 50usize;
7822    fn deser(
7823        _version: MavlinkVersion,
7824        __input: &[u8],
7825    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7826        let avail_len = __input.len();
7827        let mut payload_buf = [0; Self::ENCODED_LEN];
7828        let mut buf = if avail_len < Self::ENCODED_LEN {
7829            payload_buf[0..avail_len].copy_from_slice(__input);
7830            Bytes::new(&payload_buf)
7831        } else {
7832            Bytes::new(__input)
7833        };
7834        let mut __struct = Self::default();
7835        __struct.lat = buf.get_i32_le()?;
7836        __struct.lon = buf.get_i32_le()?;
7837        __struct.alt = buf.get_f32_le()?;
7838        __struct.h_acc = buf.get_f32_le()?;
7839        __struct.v_acc = buf.get_f32_le()?;
7840        __struct.vel_n = buf.get_f32_le()?;
7841        __struct.vel_e = buf.get_f32_le()?;
7842        __struct.vel_d = buf.get_f32_le()?;
7843        __struct.vel_acc = buf.get_f32_le()?;
7844        __struct.dist = buf.get_f32_le()?;
7845        __struct.hdg = buf.get_f32_le()?;
7846        __struct.hdg_acc = buf.get_f32_le()?;
7847        let tmp = buf.get_u8()?;
7848        __struct.tracking_status =
7849            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7850                enum_type: "CameraTrackingStatusFlags",
7851                value: tmp as u64,
7852            })?;
7853        __struct.camera_device_id = buf.get_u8()?;
7854        Ok(__struct)
7855    }
7856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7857        let mut __tmp = BytesMut::new(bytes);
7858        #[allow(clippy::absurd_extreme_comparisons)]
7859        #[allow(unused_comparisons)]
7860        if __tmp.remaining() < Self::ENCODED_LEN {
7861            panic!(
7862                "buffer is too small (need {} bytes, but got {})",
7863                Self::ENCODED_LEN,
7864                __tmp.remaining(),
7865            )
7866        }
7867        __tmp.put_i32_le(self.lat);
7868        __tmp.put_i32_le(self.lon);
7869        __tmp.put_f32_le(self.alt);
7870        __tmp.put_f32_le(self.h_acc);
7871        __tmp.put_f32_le(self.v_acc);
7872        __tmp.put_f32_le(self.vel_n);
7873        __tmp.put_f32_le(self.vel_e);
7874        __tmp.put_f32_le(self.vel_d);
7875        __tmp.put_f32_le(self.vel_acc);
7876        __tmp.put_f32_le(self.dist);
7877        __tmp.put_f32_le(self.hdg);
7878        __tmp.put_f32_le(self.hdg_acc);
7879        __tmp.put_u8(self.tracking_status as u8);
7880        if matches!(version, MavlinkVersion::V2) {
7881            __tmp.put_u8(self.camera_device_id);
7882            let len = __tmp.len();
7883            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7884        } else {
7885            __tmp.len()
7886        }
7887    }
7888}
7889#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7890#[doc = ""]
7891#[doc = "ID: 275"]
7892#[derive(Debug, Clone, PartialEq)]
7893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7894#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7895#[cfg_attr(feature = "ts", derive(TS))]
7896#[cfg_attr(feature = "ts", ts(export))]
7897pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7898    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7899    pub point_x: f32,
7900    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7901    pub point_y: f32,
7902    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7903    pub radius: f32,
7904    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7905    pub rec_top_x: f32,
7906    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7907    pub rec_top_y: f32,
7908    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7909    pub rec_bottom_x: f32,
7910    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7911    pub rec_bottom_y: f32,
7912    #[doc = "Current tracking status"]
7913    pub tracking_status: CameraTrackingStatusFlags,
7914    #[doc = "Current tracking mode"]
7915    pub tracking_mode: CameraTrackingMode,
7916    #[doc = "Defines location of target data"]
7917    pub target_data: CameraTrackingTargetData,
7918    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7919    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7920    pub camera_device_id: u8,
7921}
7922impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7923    pub const ENCODED_LEN: usize = 32usize;
7924    pub const DEFAULT: Self = Self {
7925        point_x: 0.0_f32,
7926        point_y: 0.0_f32,
7927        radius: 0.0_f32,
7928        rec_top_x: 0.0_f32,
7929        rec_top_y: 0.0_f32,
7930        rec_bottom_x: 0.0_f32,
7931        rec_bottom_y: 0.0_f32,
7932        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7933        tracking_mode: CameraTrackingMode::DEFAULT,
7934        target_data: CameraTrackingTargetData::DEFAULT,
7935        camera_device_id: 0_u8,
7936    };
7937    #[cfg(feature = "arbitrary")]
7938    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7939        use arbitrary::{Arbitrary, Unstructured};
7940        let mut buf = [0u8; 1024];
7941        rng.fill_bytes(&mut buf);
7942        let mut unstructured = Unstructured::new(&buf);
7943        Self::arbitrary(&mut unstructured).unwrap_or_default()
7944    }
7945}
7946impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7947    fn default() -> Self {
7948        Self::DEFAULT.clone()
7949    }
7950}
7951impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7952    type Message = MavMessage;
7953    const ID: u32 = 275u32;
7954    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7955    const EXTRA_CRC: u8 = 126u8;
7956    const ENCODED_LEN: usize = 32usize;
7957    fn deser(
7958        _version: MavlinkVersion,
7959        __input: &[u8],
7960    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7961        let avail_len = __input.len();
7962        let mut payload_buf = [0; Self::ENCODED_LEN];
7963        let mut buf = if avail_len < Self::ENCODED_LEN {
7964            payload_buf[0..avail_len].copy_from_slice(__input);
7965            Bytes::new(&payload_buf)
7966        } else {
7967            Bytes::new(__input)
7968        };
7969        let mut __struct = Self::default();
7970        __struct.point_x = buf.get_f32_le()?;
7971        __struct.point_y = buf.get_f32_le()?;
7972        __struct.radius = buf.get_f32_le()?;
7973        __struct.rec_top_x = buf.get_f32_le()?;
7974        __struct.rec_top_y = buf.get_f32_le()?;
7975        __struct.rec_bottom_x = buf.get_f32_le()?;
7976        __struct.rec_bottom_y = buf.get_f32_le()?;
7977        let tmp = buf.get_u8()?;
7978        __struct.tracking_status =
7979            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7980                enum_type: "CameraTrackingStatusFlags",
7981                value: tmp as u64,
7982            })?;
7983        let tmp = buf.get_u8()?;
7984        __struct.tracking_mode =
7985            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7986                enum_type: "CameraTrackingMode",
7987                value: tmp as u64,
7988            })?;
7989        let tmp = buf.get_u8()?;
7990        __struct.target_data =
7991            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
7992                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7993                flag_type: "CameraTrackingTargetData",
7994                value: tmp as u64,
7995            })?;
7996        __struct.camera_device_id = buf.get_u8()?;
7997        Ok(__struct)
7998    }
7999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8000        let mut __tmp = BytesMut::new(bytes);
8001        #[allow(clippy::absurd_extreme_comparisons)]
8002        #[allow(unused_comparisons)]
8003        if __tmp.remaining() < Self::ENCODED_LEN {
8004            panic!(
8005                "buffer is too small (need {} bytes, but got {})",
8006                Self::ENCODED_LEN,
8007                __tmp.remaining(),
8008            )
8009        }
8010        __tmp.put_f32_le(self.point_x);
8011        __tmp.put_f32_le(self.point_y);
8012        __tmp.put_f32_le(self.radius);
8013        __tmp.put_f32_le(self.rec_top_x);
8014        __tmp.put_f32_le(self.rec_top_y);
8015        __tmp.put_f32_le(self.rec_bottom_x);
8016        __tmp.put_f32_le(self.rec_bottom_y);
8017        __tmp.put_u8(self.tracking_status as u8);
8018        __tmp.put_u8(self.tracking_mode as u8);
8019        __tmp.put_u8(self.target_data.bits() as u8);
8020        if matches!(version, MavlinkVersion::V2) {
8021            __tmp.put_u8(self.camera_device_id);
8022            let len = __tmp.len();
8023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8024        } else {
8025            __tmp.len()
8026        }
8027    }
8028}
8029#[doc = "Camera-IMU triggering and synchronisation message."]
8030#[doc = ""]
8031#[doc = "ID: 112"]
8032#[derive(Debug, Clone, PartialEq)]
8033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8035#[cfg_attr(feature = "ts", derive(TS))]
8036#[cfg_attr(feature = "ts", ts(export))]
8037pub struct CAMERA_TRIGGER_DATA {
8038    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8039    pub time_usec: u64,
8040    #[doc = "Image frame sequence"]
8041    pub seq: u32,
8042}
8043impl CAMERA_TRIGGER_DATA {
8044    pub const ENCODED_LEN: usize = 12usize;
8045    pub const DEFAULT: Self = Self {
8046        time_usec: 0_u64,
8047        seq: 0_u32,
8048    };
8049    #[cfg(feature = "arbitrary")]
8050    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8051        use arbitrary::{Arbitrary, Unstructured};
8052        let mut buf = [0u8; 1024];
8053        rng.fill_bytes(&mut buf);
8054        let mut unstructured = Unstructured::new(&buf);
8055        Self::arbitrary(&mut unstructured).unwrap_or_default()
8056    }
8057}
8058impl Default for CAMERA_TRIGGER_DATA {
8059    fn default() -> Self {
8060        Self::DEFAULT.clone()
8061    }
8062}
8063impl MessageData for CAMERA_TRIGGER_DATA {
8064    type Message = MavMessage;
8065    const ID: u32 = 112u32;
8066    const NAME: &'static str = "CAMERA_TRIGGER";
8067    const EXTRA_CRC: u8 = 174u8;
8068    const ENCODED_LEN: usize = 12usize;
8069    fn deser(
8070        _version: MavlinkVersion,
8071        __input: &[u8],
8072    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8073        let avail_len = __input.len();
8074        let mut payload_buf = [0; Self::ENCODED_LEN];
8075        let mut buf = if avail_len < Self::ENCODED_LEN {
8076            payload_buf[0..avail_len].copy_from_slice(__input);
8077            Bytes::new(&payload_buf)
8078        } else {
8079            Bytes::new(__input)
8080        };
8081        let mut __struct = Self::default();
8082        __struct.time_usec = buf.get_u64_le()?;
8083        __struct.seq = buf.get_u32_le()?;
8084        Ok(__struct)
8085    }
8086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8087        let mut __tmp = BytesMut::new(bytes);
8088        #[allow(clippy::absurd_extreme_comparisons)]
8089        #[allow(unused_comparisons)]
8090        if __tmp.remaining() < Self::ENCODED_LEN {
8091            panic!(
8092                "buffer is too small (need {} bytes, but got {})",
8093                Self::ENCODED_LEN,
8094                __tmp.remaining(),
8095            )
8096        }
8097        __tmp.put_u64_le(self.time_usec);
8098        __tmp.put_u32_le(self.seq);
8099        if matches!(version, MavlinkVersion::V2) {
8100            let len = __tmp.len();
8101            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8102        } else {
8103            __tmp.len()
8104        }
8105    }
8106}
8107#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8108#[doc = ""]
8109#[doc = "ID: 387"]
8110#[derive(Debug, Clone, PartialEq)]
8111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8113#[cfg_attr(feature = "ts", derive(TS))]
8114#[cfg_attr(feature = "ts", ts(export))]
8115pub struct CANFD_FRAME_DATA {
8116    #[doc = "Frame ID"]
8117    pub id: u32,
8118    #[doc = "System ID."]
8119    pub target_system: u8,
8120    #[doc = "Component ID."]
8121    pub target_component: u8,
8122    #[doc = "bus number"]
8123    pub bus: u8,
8124    #[doc = "Frame length"]
8125    pub len: u8,
8126    #[doc = "Frame data"]
8127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8128    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8129    pub data: [u8; 64],
8130}
8131impl CANFD_FRAME_DATA {
8132    pub const ENCODED_LEN: usize = 72usize;
8133    pub const DEFAULT: Self = Self {
8134        id: 0_u32,
8135        target_system: 0_u8,
8136        target_component: 0_u8,
8137        bus: 0_u8,
8138        len: 0_u8,
8139        data: [0_u8; 64usize],
8140    };
8141    #[cfg(feature = "arbitrary")]
8142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8143        use arbitrary::{Arbitrary, Unstructured};
8144        let mut buf = [0u8; 1024];
8145        rng.fill_bytes(&mut buf);
8146        let mut unstructured = Unstructured::new(&buf);
8147        Self::arbitrary(&mut unstructured).unwrap_or_default()
8148    }
8149}
8150impl Default for CANFD_FRAME_DATA {
8151    fn default() -> Self {
8152        Self::DEFAULT.clone()
8153    }
8154}
8155impl MessageData for CANFD_FRAME_DATA {
8156    type Message = MavMessage;
8157    const ID: u32 = 387u32;
8158    const NAME: &'static str = "CANFD_FRAME";
8159    const EXTRA_CRC: u8 = 4u8;
8160    const ENCODED_LEN: usize = 72usize;
8161    fn deser(
8162        _version: MavlinkVersion,
8163        __input: &[u8],
8164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8165        let avail_len = __input.len();
8166        let mut payload_buf = [0; Self::ENCODED_LEN];
8167        let mut buf = if avail_len < Self::ENCODED_LEN {
8168            payload_buf[0..avail_len].copy_from_slice(__input);
8169            Bytes::new(&payload_buf)
8170        } else {
8171            Bytes::new(__input)
8172        };
8173        let mut __struct = Self::default();
8174        __struct.id = buf.get_u32_le()?;
8175        __struct.target_system = buf.get_u8()?;
8176        __struct.target_component = buf.get_u8()?;
8177        __struct.bus = buf.get_u8()?;
8178        __struct.len = buf.get_u8()?;
8179        for v in &mut __struct.data {
8180            let val = buf.get_u8()?;
8181            *v = val;
8182        }
8183        Ok(__struct)
8184    }
8185    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8186        let mut __tmp = BytesMut::new(bytes);
8187        #[allow(clippy::absurd_extreme_comparisons)]
8188        #[allow(unused_comparisons)]
8189        if __tmp.remaining() < Self::ENCODED_LEN {
8190            panic!(
8191                "buffer is too small (need {} bytes, but got {})",
8192                Self::ENCODED_LEN,
8193                __tmp.remaining(),
8194            )
8195        }
8196        __tmp.put_u32_le(self.id);
8197        __tmp.put_u8(self.target_system);
8198        __tmp.put_u8(self.target_component);
8199        __tmp.put_u8(self.bus);
8200        __tmp.put_u8(self.len);
8201        for val in &self.data {
8202            __tmp.put_u8(*val);
8203        }
8204        if matches!(version, MavlinkVersion::V2) {
8205            let len = __tmp.len();
8206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8207        } else {
8208            __tmp.len()
8209        }
8210    }
8211}
8212#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8213#[doc = ""]
8214#[doc = "ID: 388"]
8215#[derive(Debug, Clone, PartialEq)]
8216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8218#[cfg_attr(feature = "ts", derive(TS))]
8219#[cfg_attr(feature = "ts", ts(export))]
8220pub struct CAN_FILTER_MODIFY_DATA {
8221    #[doc = "filter IDs, length num_ids"]
8222    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8223    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8224    pub ids: [u16; 16],
8225    #[doc = "System ID."]
8226    pub target_system: u8,
8227    #[doc = "Component ID."]
8228    pub target_component: u8,
8229    #[doc = "bus number"]
8230    pub bus: u8,
8231    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8232    pub operation: CanFilterOp,
8233    #[doc = "number of IDs in filter list"]
8234    pub num_ids: u8,
8235}
8236impl CAN_FILTER_MODIFY_DATA {
8237    pub const ENCODED_LEN: usize = 37usize;
8238    pub const DEFAULT: Self = Self {
8239        ids: [0_u16; 16usize],
8240        target_system: 0_u8,
8241        target_component: 0_u8,
8242        bus: 0_u8,
8243        operation: CanFilterOp::DEFAULT,
8244        num_ids: 0_u8,
8245    };
8246    #[cfg(feature = "arbitrary")]
8247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8248        use arbitrary::{Arbitrary, Unstructured};
8249        let mut buf = [0u8; 1024];
8250        rng.fill_bytes(&mut buf);
8251        let mut unstructured = Unstructured::new(&buf);
8252        Self::arbitrary(&mut unstructured).unwrap_or_default()
8253    }
8254}
8255impl Default for CAN_FILTER_MODIFY_DATA {
8256    fn default() -> Self {
8257        Self::DEFAULT.clone()
8258    }
8259}
8260impl MessageData for CAN_FILTER_MODIFY_DATA {
8261    type Message = MavMessage;
8262    const ID: u32 = 388u32;
8263    const NAME: &'static str = "CAN_FILTER_MODIFY";
8264    const EXTRA_CRC: u8 = 8u8;
8265    const ENCODED_LEN: usize = 37usize;
8266    fn deser(
8267        _version: MavlinkVersion,
8268        __input: &[u8],
8269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8270        let avail_len = __input.len();
8271        let mut payload_buf = [0; Self::ENCODED_LEN];
8272        let mut buf = if avail_len < Self::ENCODED_LEN {
8273            payload_buf[0..avail_len].copy_from_slice(__input);
8274            Bytes::new(&payload_buf)
8275        } else {
8276            Bytes::new(__input)
8277        };
8278        let mut __struct = Self::default();
8279        for v in &mut __struct.ids {
8280            let val = buf.get_u16_le()?;
8281            *v = val;
8282        }
8283        __struct.target_system = buf.get_u8()?;
8284        __struct.target_component = buf.get_u8()?;
8285        __struct.bus = buf.get_u8()?;
8286        let tmp = buf.get_u8()?;
8287        __struct.operation =
8288            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8289                enum_type: "CanFilterOp",
8290                value: tmp as u64,
8291            })?;
8292        __struct.num_ids = buf.get_u8()?;
8293        Ok(__struct)
8294    }
8295    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8296        let mut __tmp = BytesMut::new(bytes);
8297        #[allow(clippy::absurd_extreme_comparisons)]
8298        #[allow(unused_comparisons)]
8299        if __tmp.remaining() < Self::ENCODED_LEN {
8300            panic!(
8301                "buffer is too small (need {} bytes, but got {})",
8302                Self::ENCODED_LEN,
8303                __tmp.remaining(),
8304            )
8305        }
8306        for val in &self.ids {
8307            __tmp.put_u16_le(*val);
8308        }
8309        __tmp.put_u8(self.target_system);
8310        __tmp.put_u8(self.target_component);
8311        __tmp.put_u8(self.bus);
8312        __tmp.put_u8(self.operation as u8);
8313        __tmp.put_u8(self.num_ids);
8314        if matches!(version, MavlinkVersion::V2) {
8315            let len = __tmp.len();
8316            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8317        } else {
8318            __tmp.len()
8319        }
8320    }
8321}
8322#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8323#[doc = ""]
8324#[doc = "ID: 386"]
8325#[derive(Debug, Clone, PartialEq)]
8326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8328#[cfg_attr(feature = "ts", derive(TS))]
8329#[cfg_attr(feature = "ts", ts(export))]
8330pub struct CAN_FRAME_DATA {
8331    #[doc = "Frame ID"]
8332    pub id: u32,
8333    #[doc = "System ID."]
8334    pub target_system: u8,
8335    #[doc = "Component ID."]
8336    pub target_component: u8,
8337    #[doc = "Bus number"]
8338    pub bus: u8,
8339    #[doc = "Frame length"]
8340    pub len: u8,
8341    #[doc = "Frame data"]
8342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8343    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8344    pub data: [u8; 8],
8345}
8346impl CAN_FRAME_DATA {
8347    pub const ENCODED_LEN: usize = 16usize;
8348    pub const DEFAULT: Self = Self {
8349        id: 0_u32,
8350        target_system: 0_u8,
8351        target_component: 0_u8,
8352        bus: 0_u8,
8353        len: 0_u8,
8354        data: [0_u8; 8usize],
8355    };
8356    #[cfg(feature = "arbitrary")]
8357    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8358        use arbitrary::{Arbitrary, Unstructured};
8359        let mut buf = [0u8; 1024];
8360        rng.fill_bytes(&mut buf);
8361        let mut unstructured = Unstructured::new(&buf);
8362        Self::arbitrary(&mut unstructured).unwrap_or_default()
8363    }
8364}
8365impl Default for CAN_FRAME_DATA {
8366    fn default() -> Self {
8367        Self::DEFAULT.clone()
8368    }
8369}
8370impl MessageData for CAN_FRAME_DATA {
8371    type Message = MavMessage;
8372    const ID: u32 = 386u32;
8373    const NAME: &'static str = "CAN_FRAME";
8374    const EXTRA_CRC: u8 = 132u8;
8375    const ENCODED_LEN: usize = 16usize;
8376    fn deser(
8377        _version: MavlinkVersion,
8378        __input: &[u8],
8379    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8380        let avail_len = __input.len();
8381        let mut payload_buf = [0; Self::ENCODED_LEN];
8382        let mut buf = if avail_len < Self::ENCODED_LEN {
8383            payload_buf[0..avail_len].copy_from_slice(__input);
8384            Bytes::new(&payload_buf)
8385        } else {
8386            Bytes::new(__input)
8387        };
8388        let mut __struct = Self::default();
8389        __struct.id = buf.get_u32_le()?;
8390        __struct.target_system = buf.get_u8()?;
8391        __struct.target_component = buf.get_u8()?;
8392        __struct.bus = buf.get_u8()?;
8393        __struct.len = buf.get_u8()?;
8394        for v in &mut __struct.data {
8395            let val = buf.get_u8()?;
8396            *v = val;
8397        }
8398        Ok(__struct)
8399    }
8400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8401        let mut __tmp = BytesMut::new(bytes);
8402        #[allow(clippy::absurd_extreme_comparisons)]
8403        #[allow(unused_comparisons)]
8404        if __tmp.remaining() < Self::ENCODED_LEN {
8405            panic!(
8406                "buffer is too small (need {} bytes, but got {})",
8407                Self::ENCODED_LEN,
8408                __tmp.remaining(),
8409            )
8410        }
8411        __tmp.put_u32_le(self.id);
8412        __tmp.put_u8(self.target_system);
8413        __tmp.put_u8(self.target_component);
8414        __tmp.put_u8(self.bus);
8415        __tmp.put_u8(self.len);
8416        for val in &self.data {
8417            __tmp.put_u8(*val);
8418        }
8419        if matches!(version, MavlinkVersion::V2) {
8420            let len = __tmp.len();
8421            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8422        } else {
8423            __tmp.len()
8424        }
8425    }
8426}
8427#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8428#[doc = ""]
8429#[doc = "ID: 336"]
8430#[derive(Debug, Clone, PartialEq)]
8431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8433#[cfg_attr(feature = "ts", derive(TS))]
8434#[cfg_attr(feature = "ts", ts(export))]
8435pub struct CELLULAR_CONFIG_DATA {
8436    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8437    pub enable_lte: u8,
8438    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8439    pub enable_pin: u8,
8440    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8441    #[cfg_attr(feature = "ts", ts(type = "string"))]
8442    pub pin: CharArray<16>,
8443    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8444    #[cfg_attr(feature = "ts", ts(type = "string"))]
8445    pub new_pin: CharArray<16>,
8446    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8447    #[cfg_attr(feature = "ts", ts(type = "string"))]
8448    pub apn: CharArray<32>,
8449    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8450    #[cfg_attr(feature = "ts", ts(type = "string"))]
8451    pub puk: CharArray<16>,
8452    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8453    pub roaming: u8,
8454    #[doc = "Message acceptance response (sent back to GS)."]
8455    pub response: CellularConfigResponse,
8456}
8457impl CELLULAR_CONFIG_DATA {
8458    pub const ENCODED_LEN: usize = 84usize;
8459    pub const DEFAULT: Self = Self {
8460        enable_lte: 0_u8,
8461        enable_pin: 0_u8,
8462        pin: CharArray::new([0_u8; 16usize]),
8463        new_pin: CharArray::new([0_u8; 16usize]),
8464        apn: CharArray::new([0_u8; 32usize]),
8465        puk: CharArray::new([0_u8; 16usize]),
8466        roaming: 0_u8,
8467        response: CellularConfigResponse::DEFAULT,
8468    };
8469    #[cfg(feature = "arbitrary")]
8470    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8471        use arbitrary::{Arbitrary, Unstructured};
8472        let mut buf = [0u8; 1024];
8473        rng.fill_bytes(&mut buf);
8474        let mut unstructured = Unstructured::new(&buf);
8475        Self::arbitrary(&mut unstructured).unwrap_or_default()
8476    }
8477}
8478impl Default for CELLULAR_CONFIG_DATA {
8479    fn default() -> Self {
8480        Self::DEFAULT.clone()
8481    }
8482}
8483impl MessageData for CELLULAR_CONFIG_DATA {
8484    type Message = MavMessage;
8485    const ID: u32 = 336u32;
8486    const NAME: &'static str = "CELLULAR_CONFIG";
8487    const EXTRA_CRC: u8 = 245u8;
8488    const ENCODED_LEN: usize = 84usize;
8489    fn deser(
8490        _version: MavlinkVersion,
8491        __input: &[u8],
8492    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8493        let avail_len = __input.len();
8494        let mut payload_buf = [0; Self::ENCODED_LEN];
8495        let mut buf = if avail_len < Self::ENCODED_LEN {
8496            payload_buf[0..avail_len].copy_from_slice(__input);
8497            Bytes::new(&payload_buf)
8498        } else {
8499            Bytes::new(__input)
8500        };
8501        let mut __struct = Self::default();
8502        __struct.enable_lte = buf.get_u8()?;
8503        __struct.enable_pin = buf.get_u8()?;
8504        let mut tmp = [0_u8; 16usize];
8505        for v in &mut tmp {
8506            *v = buf.get_u8()?;
8507        }
8508        __struct.pin = CharArray::new(tmp);
8509        let mut tmp = [0_u8; 16usize];
8510        for v in &mut tmp {
8511            *v = buf.get_u8()?;
8512        }
8513        __struct.new_pin = CharArray::new(tmp);
8514        let mut tmp = [0_u8; 32usize];
8515        for v in &mut tmp {
8516            *v = buf.get_u8()?;
8517        }
8518        __struct.apn = CharArray::new(tmp);
8519        let mut tmp = [0_u8; 16usize];
8520        for v in &mut tmp {
8521            *v = buf.get_u8()?;
8522        }
8523        __struct.puk = CharArray::new(tmp);
8524        __struct.roaming = buf.get_u8()?;
8525        let tmp = buf.get_u8()?;
8526        __struct.response =
8527            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8528                enum_type: "CellularConfigResponse",
8529                value: tmp as u64,
8530            })?;
8531        Ok(__struct)
8532    }
8533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8534        let mut __tmp = BytesMut::new(bytes);
8535        #[allow(clippy::absurd_extreme_comparisons)]
8536        #[allow(unused_comparisons)]
8537        if __tmp.remaining() < Self::ENCODED_LEN {
8538            panic!(
8539                "buffer is too small (need {} bytes, but got {})",
8540                Self::ENCODED_LEN,
8541                __tmp.remaining(),
8542            )
8543        }
8544        __tmp.put_u8(self.enable_lte);
8545        __tmp.put_u8(self.enable_pin);
8546        for val in &self.pin {
8547            __tmp.put_u8(*val);
8548        }
8549        for val in &self.new_pin {
8550            __tmp.put_u8(*val);
8551        }
8552        for val in &self.apn {
8553            __tmp.put_u8(*val);
8554        }
8555        for val in &self.puk {
8556            __tmp.put_u8(*val);
8557        }
8558        __tmp.put_u8(self.roaming);
8559        __tmp.put_u8(self.response as u8);
8560        if matches!(version, MavlinkVersion::V2) {
8561            let len = __tmp.len();
8562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8563        } else {
8564            __tmp.len()
8565        }
8566    }
8567}
8568#[doc = "Report current used cellular network status."]
8569#[doc = ""]
8570#[doc = "ID: 334"]
8571#[derive(Debug, Clone, PartialEq)]
8572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8574#[cfg_attr(feature = "ts", derive(TS))]
8575#[cfg_attr(feature = "ts", ts(export))]
8576pub struct CELLULAR_STATUS_DATA {
8577    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8578    pub mcc: u16,
8579    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8580    pub mnc: u16,
8581    #[doc = "Location area code. If unknown, set to 0"]
8582    pub lac: u16,
8583    #[doc = "Cellular modem status"]
8584    pub status: CellularStatusFlag,
8585    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8586    pub failure_reason: CellularNetworkFailedReason,
8587    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8588    pub mavtype: CellularNetworkRadioType,
8589    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8590    pub quality: u8,
8591}
8592impl CELLULAR_STATUS_DATA {
8593    pub const ENCODED_LEN: usize = 10usize;
8594    pub const DEFAULT: Self = Self {
8595        mcc: 0_u16,
8596        mnc: 0_u16,
8597        lac: 0_u16,
8598        status: CellularStatusFlag::DEFAULT,
8599        failure_reason: CellularNetworkFailedReason::DEFAULT,
8600        mavtype: CellularNetworkRadioType::DEFAULT,
8601        quality: 0_u8,
8602    };
8603    #[cfg(feature = "arbitrary")]
8604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8605        use arbitrary::{Arbitrary, Unstructured};
8606        let mut buf = [0u8; 1024];
8607        rng.fill_bytes(&mut buf);
8608        let mut unstructured = Unstructured::new(&buf);
8609        Self::arbitrary(&mut unstructured).unwrap_or_default()
8610    }
8611}
8612impl Default for CELLULAR_STATUS_DATA {
8613    fn default() -> Self {
8614        Self::DEFAULT.clone()
8615    }
8616}
8617impl MessageData for CELLULAR_STATUS_DATA {
8618    type Message = MavMessage;
8619    const ID: u32 = 334u32;
8620    const NAME: &'static str = "CELLULAR_STATUS";
8621    const EXTRA_CRC: u8 = 72u8;
8622    const ENCODED_LEN: usize = 10usize;
8623    fn deser(
8624        _version: MavlinkVersion,
8625        __input: &[u8],
8626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8627        let avail_len = __input.len();
8628        let mut payload_buf = [0; Self::ENCODED_LEN];
8629        let mut buf = if avail_len < Self::ENCODED_LEN {
8630            payload_buf[0..avail_len].copy_from_slice(__input);
8631            Bytes::new(&payload_buf)
8632        } else {
8633            Bytes::new(__input)
8634        };
8635        let mut __struct = Self::default();
8636        __struct.mcc = buf.get_u16_le()?;
8637        __struct.mnc = buf.get_u16_le()?;
8638        __struct.lac = buf.get_u16_le()?;
8639        let tmp = buf.get_u8()?;
8640        __struct.status =
8641            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8642                enum_type: "CellularStatusFlag",
8643                value: tmp as u64,
8644            })?;
8645        let tmp = buf.get_u8()?;
8646        __struct.failure_reason =
8647            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8648                enum_type: "CellularNetworkFailedReason",
8649                value: tmp as u64,
8650            })?;
8651        let tmp = buf.get_u8()?;
8652        __struct.mavtype =
8653            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8654                enum_type: "CellularNetworkRadioType",
8655                value: tmp as u64,
8656            })?;
8657        __struct.quality = buf.get_u8()?;
8658        Ok(__struct)
8659    }
8660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8661        let mut __tmp = BytesMut::new(bytes);
8662        #[allow(clippy::absurd_extreme_comparisons)]
8663        #[allow(unused_comparisons)]
8664        if __tmp.remaining() < Self::ENCODED_LEN {
8665            panic!(
8666                "buffer is too small (need {} bytes, but got {})",
8667                Self::ENCODED_LEN,
8668                __tmp.remaining(),
8669            )
8670        }
8671        __tmp.put_u16_le(self.mcc);
8672        __tmp.put_u16_le(self.mnc);
8673        __tmp.put_u16_le(self.lac);
8674        __tmp.put_u8(self.status as u8);
8675        __tmp.put_u8(self.failure_reason as u8);
8676        __tmp.put_u8(self.mavtype as u8);
8677        __tmp.put_u8(self.quality);
8678        if matches!(version, MavlinkVersion::V2) {
8679            let len = __tmp.len();
8680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8681        } else {
8682            __tmp.len()
8683        }
8684    }
8685}
8686#[doc = "Request to control this MAV."]
8687#[doc = ""]
8688#[doc = "ID: 5"]
8689#[derive(Debug, Clone, PartialEq)]
8690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8692#[cfg_attr(feature = "ts", derive(TS))]
8693#[cfg_attr(feature = "ts", ts(export))]
8694pub struct CHANGE_OPERATOR_CONTROL_DATA {
8695    #[doc = "System the GCS requests control for"]
8696    pub target_system: u8,
8697    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8698    pub control_request: u8,
8699    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8700    pub version: u8,
8701    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8702    #[cfg_attr(feature = "ts", ts(type = "string"))]
8703    pub passkey: CharArray<25>,
8704}
8705impl CHANGE_OPERATOR_CONTROL_DATA {
8706    pub const ENCODED_LEN: usize = 28usize;
8707    pub const DEFAULT: Self = Self {
8708        target_system: 0_u8,
8709        control_request: 0_u8,
8710        version: 0_u8,
8711        passkey: CharArray::new([0_u8; 25usize]),
8712    };
8713    #[cfg(feature = "arbitrary")]
8714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8715        use arbitrary::{Arbitrary, Unstructured};
8716        let mut buf = [0u8; 1024];
8717        rng.fill_bytes(&mut buf);
8718        let mut unstructured = Unstructured::new(&buf);
8719        Self::arbitrary(&mut unstructured).unwrap_or_default()
8720    }
8721}
8722impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8723    fn default() -> Self {
8724        Self::DEFAULT.clone()
8725    }
8726}
8727impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8728    type Message = MavMessage;
8729    const ID: u32 = 5u32;
8730    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8731    const EXTRA_CRC: u8 = 217u8;
8732    const ENCODED_LEN: usize = 28usize;
8733    fn deser(
8734        _version: MavlinkVersion,
8735        __input: &[u8],
8736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8737        let avail_len = __input.len();
8738        let mut payload_buf = [0; Self::ENCODED_LEN];
8739        let mut buf = if avail_len < Self::ENCODED_LEN {
8740            payload_buf[0..avail_len].copy_from_slice(__input);
8741            Bytes::new(&payload_buf)
8742        } else {
8743            Bytes::new(__input)
8744        };
8745        let mut __struct = Self::default();
8746        __struct.target_system = buf.get_u8()?;
8747        __struct.control_request = buf.get_u8()?;
8748        __struct.version = buf.get_u8()?;
8749        let mut tmp = [0_u8; 25usize];
8750        for v in &mut tmp {
8751            *v = buf.get_u8()?;
8752        }
8753        __struct.passkey = CharArray::new(tmp);
8754        Ok(__struct)
8755    }
8756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8757        let mut __tmp = BytesMut::new(bytes);
8758        #[allow(clippy::absurd_extreme_comparisons)]
8759        #[allow(unused_comparisons)]
8760        if __tmp.remaining() < Self::ENCODED_LEN {
8761            panic!(
8762                "buffer is too small (need {} bytes, but got {})",
8763                Self::ENCODED_LEN,
8764                __tmp.remaining(),
8765            )
8766        }
8767        __tmp.put_u8(self.target_system);
8768        __tmp.put_u8(self.control_request);
8769        __tmp.put_u8(self.version);
8770        for val in &self.passkey {
8771            __tmp.put_u8(*val);
8772        }
8773        if matches!(version, MavlinkVersion::V2) {
8774            let len = __tmp.len();
8775            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8776        } else {
8777            __tmp.len()
8778        }
8779    }
8780}
8781#[doc = "Accept / deny control of this MAV."]
8782#[doc = ""]
8783#[doc = "ID: 6"]
8784#[derive(Debug, Clone, PartialEq)]
8785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8787#[cfg_attr(feature = "ts", derive(TS))]
8788#[cfg_attr(feature = "ts", ts(export))]
8789pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8790    #[doc = "ID of the GCS this message"]
8791    pub gcs_system_id: u8,
8792    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8793    pub control_request: u8,
8794    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8795    pub ack: u8,
8796}
8797impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8798    pub const ENCODED_LEN: usize = 3usize;
8799    pub const DEFAULT: Self = Self {
8800        gcs_system_id: 0_u8,
8801        control_request: 0_u8,
8802        ack: 0_u8,
8803    };
8804    #[cfg(feature = "arbitrary")]
8805    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8806        use arbitrary::{Arbitrary, Unstructured};
8807        let mut buf = [0u8; 1024];
8808        rng.fill_bytes(&mut buf);
8809        let mut unstructured = Unstructured::new(&buf);
8810        Self::arbitrary(&mut unstructured).unwrap_or_default()
8811    }
8812}
8813impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8814    fn default() -> Self {
8815        Self::DEFAULT.clone()
8816    }
8817}
8818impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8819    type Message = MavMessage;
8820    const ID: u32 = 6u32;
8821    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8822    const EXTRA_CRC: u8 = 104u8;
8823    const ENCODED_LEN: usize = 3usize;
8824    fn deser(
8825        _version: MavlinkVersion,
8826        __input: &[u8],
8827    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8828        let avail_len = __input.len();
8829        let mut payload_buf = [0; Self::ENCODED_LEN];
8830        let mut buf = if avail_len < Self::ENCODED_LEN {
8831            payload_buf[0..avail_len].copy_from_slice(__input);
8832            Bytes::new(&payload_buf)
8833        } else {
8834            Bytes::new(__input)
8835        };
8836        let mut __struct = Self::default();
8837        __struct.gcs_system_id = buf.get_u8()?;
8838        __struct.control_request = buf.get_u8()?;
8839        __struct.ack = buf.get_u8()?;
8840        Ok(__struct)
8841    }
8842    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8843        let mut __tmp = BytesMut::new(bytes);
8844        #[allow(clippy::absurd_extreme_comparisons)]
8845        #[allow(unused_comparisons)]
8846        if __tmp.remaining() < Self::ENCODED_LEN {
8847            panic!(
8848                "buffer is too small (need {} bytes, but got {})",
8849                Self::ENCODED_LEN,
8850                __tmp.remaining(),
8851            )
8852        }
8853        __tmp.put_u8(self.gcs_system_id);
8854        __tmp.put_u8(self.control_request);
8855        __tmp.put_u8(self.ack);
8856        if matches!(version, MavlinkVersion::V2) {
8857            let len = __tmp.len();
8858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8859        } else {
8860            __tmp.len()
8861        }
8862    }
8863}
8864#[doc = "Information about a potential collision."]
8865#[doc = ""]
8866#[doc = "ID: 247"]
8867#[derive(Debug, Clone, PartialEq)]
8868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8870#[cfg_attr(feature = "ts", derive(TS))]
8871#[cfg_attr(feature = "ts", ts(export))]
8872pub struct COLLISION_DATA {
8873    #[doc = "Unique identifier, domain based on src field"]
8874    pub id: u32,
8875    #[doc = "Estimated time until collision occurs"]
8876    pub time_to_minimum_delta: f32,
8877    #[doc = "Closest vertical distance between vehicle and object"]
8878    pub altitude_minimum_delta: f32,
8879    #[doc = "Closest horizontal distance between vehicle and object"]
8880    pub horizontal_minimum_delta: f32,
8881    #[doc = "Collision data source"]
8882    pub src: MavCollisionSrc,
8883    #[doc = "Action that is being taken to avoid this collision"]
8884    pub action: MavCollisionAction,
8885    #[doc = "How concerned the aircraft is about this collision"]
8886    pub threat_level: MavCollisionThreatLevel,
8887}
8888impl COLLISION_DATA {
8889    pub const ENCODED_LEN: usize = 19usize;
8890    pub const DEFAULT: Self = Self {
8891        id: 0_u32,
8892        time_to_minimum_delta: 0.0_f32,
8893        altitude_minimum_delta: 0.0_f32,
8894        horizontal_minimum_delta: 0.0_f32,
8895        src: MavCollisionSrc::DEFAULT,
8896        action: MavCollisionAction::DEFAULT,
8897        threat_level: MavCollisionThreatLevel::DEFAULT,
8898    };
8899    #[cfg(feature = "arbitrary")]
8900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8901        use arbitrary::{Arbitrary, Unstructured};
8902        let mut buf = [0u8; 1024];
8903        rng.fill_bytes(&mut buf);
8904        let mut unstructured = Unstructured::new(&buf);
8905        Self::arbitrary(&mut unstructured).unwrap_or_default()
8906    }
8907}
8908impl Default for COLLISION_DATA {
8909    fn default() -> Self {
8910        Self::DEFAULT.clone()
8911    }
8912}
8913impl MessageData for COLLISION_DATA {
8914    type Message = MavMessage;
8915    const ID: u32 = 247u32;
8916    const NAME: &'static str = "COLLISION";
8917    const EXTRA_CRC: u8 = 81u8;
8918    const ENCODED_LEN: usize = 19usize;
8919    fn deser(
8920        _version: MavlinkVersion,
8921        __input: &[u8],
8922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8923        let avail_len = __input.len();
8924        let mut payload_buf = [0; Self::ENCODED_LEN];
8925        let mut buf = if avail_len < Self::ENCODED_LEN {
8926            payload_buf[0..avail_len].copy_from_slice(__input);
8927            Bytes::new(&payload_buf)
8928        } else {
8929            Bytes::new(__input)
8930        };
8931        let mut __struct = Self::default();
8932        __struct.id = buf.get_u32_le()?;
8933        __struct.time_to_minimum_delta = buf.get_f32_le()?;
8934        __struct.altitude_minimum_delta = buf.get_f32_le()?;
8935        __struct.horizontal_minimum_delta = buf.get_f32_le()?;
8936        let tmp = buf.get_u8()?;
8937        __struct.src =
8938            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8939                enum_type: "MavCollisionSrc",
8940                value: tmp as u64,
8941            })?;
8942        let tmp = buf.get_u8()?;
8943        __struct.action =
8944            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8945                enum_type: "MavCollisionAction",
8946                value: tmp as u64,
8947            })?;
8948        let tmp = buf.get_u8()?;
8949        __struct.threat_level =
8950            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8951                enum_type: "MavCollisionThreatLevel",
8952                value: tmp as u64,
8953            })?;
8954        Ok(__struct)
8955    }
8956    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8957        let mut __tmp = BytesMut::new(bytes);
8958        #[allow(clippy::absurd_extreme_comparisons)]
8959        #[allow(unused_comparisons)]
8960        if __tmp.remaining() < Self::ENCODED_LEN {
8961            panic!(
8962                "buffer is too small (need {} bytes, but got {})",
8963                Self::ENCODED_LEN,
8964                __tmp.remaining(),
8965            )
8966        }
8967        __tmp.put_u32_le(self.id);
8968        __tmp.put_f32_le(self.time_to_minimum_delta);
8969        __tmp.put_f32_le(self.altitude_minimum_delta);
8970        __tmp.put_f32_le(self.horizontal_minimum_delta);
8971        __tmp.put_u8(self.src as u8);
8972        __tmp.put_u8(self.action as u8);
8973        __tmp.put_u8(self.threat_level as u8);
8974        if matches!(version, MavlinkVersion::V2) {
8975            let len = __tmp.len();
8976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8977        } else {
8978            __tmp.len()
8979        }
8980    }
8981}
8982#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8983#[doc = ""]
8984#[doc = "ID: 77"]
8985#[derive(Debug, Clone, PartialEq)]
8986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8988#[cfg_attr(feature = "ts", derive(TS))]
8989#[cfg_attr(feature = "ts", ts(export))]
8990pub struct COMMAND_ACK_DATA {
8991    #[doc = "Command ID (of acknowledged command)."]
8992    pub command: MavCmd,
8993    #[doc = "Result of command."]
8994    pub result: MavResult,
8995    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8996    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8997    pub progress: u8,
8998    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8999    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9000    pub result_param2: i32,
9001    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9002    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9003    pub target_system: u8,
9004    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9005    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9006    pub target_component: u8,
9007}
9008impl COMMAND_ACK_DATA {
9009    pub const ENCODED_LEN: usize = 10usize;
9010    pub const DEFAULT: Self = Self {
9011        command: MavCmd::DEFAULT,
9012        result: MavResult::DEFAULT,
9013        progress: 0_u8,
9014        result_param2: 0_i32,
9015        target_system: 0_u8,
9016        target_component: 0_u8,
9017    };
9018    #[cfg(feature = "arbitrary")]
9019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9020        use arbitrary::{Arbitrary, Unstructured};
9021        let mut buf = [0u8; 1024];
9022        rng.fill_bytes(&mut buf);
9023        let mut unstructured = Unstructured::new(&buf);
9024        Self::arbitrary(&mut unstructured).unwrap_or_default()
9025    }
9026}
9027impl Default for COMMAND_ACK_DATA {
9028    fn default() -> Self {
9029        Self::DEFAULT.clone()
9030    }
9031}
9032impl MessageData for COMMAND_ACK_DATA {
9033    type Message = MavMessage;
9034    const ID: u32 = 77u32;
9035    const NAME: &'static str = "COMMAND_ACK";
9036    const EXTRA_CRC: u8 = 143u8;
9037    const ENCODED_LEN: usize = 10usize;
9038    fn deser(
9039        _version: MavlinkVersion,
9040        __input: &[u8],
9041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9042        let avail_len = __input.len();
9043        let mut payload_buf = [0; Self::ENCODED_LEN];
9044        let mut buf = if avail_len < Self::ENCODED_LEN {
9045            payload_buf[0..avail_len].copy_from_slice(__input);
9046            Bytes::new(&payload_buf)
9047        } else {
9048            Bytes::new(__input)
9049        };
9050        let mut __struct = Self::default();
9051        let tmp = buf.get_u16_le()?;
9052        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9053            ::mavlink_core::error::ParserError::InvalidEnum {
9054                enum_type: "MavCmd",
9055                value: tmp as u64,
9056            },
9057        )?;
9058        let tmp = buf.get_u8()?;
9059        __struct.result =
9060            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9061                enum_type: "MavResult",
9062                value: tmp as u64,
9063            })?;
9064        __struct.progress = buf.get_u8()?;
9065        __struct.result_param2 = buf.get_i32_le()?;
9066        __struct.target_system = buf.get_u8()?;
9067        __struct.target_component = buf.get_u8()?;
9068        Ok(__struct)
9069    }
9070    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9071        let mut __tmp = BytesMut::new(bytes);
9072        #[allow(clippy::absurd_extreme_comparisons)]
9073        #[allow(unused_comparisons)]
9074        if __tmp.remaining() < Self::ENCODED_LEN {
9075            panic!(
9076                "buffer is too small (need {} bytes, but got {})",
9077                Self::ENCODED_LEN,
9078                __tmp.remaining(),
9079            )
9080        }
9081        __tmp.put_u16_le(self.command as u16);
9082        __tmp.put_u8(self.result as u8);
9083        if matches!(version, MavlinkVersion::V2) {
9084            __tmp.put_u8(self.progress);
9085            __tmp.put_i32_le(self.result_param2);
9086            __tmp.put_u8(self.target_system);
9087            __tmp.put_u8(self.target_component);
9088            let len = __tmp.len();
9089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9090        } else {
9091            __tmp.len()
9092        }
9093    }
9094}
9095#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9096#[doc = ""]
9097#[doc = "ID: 80"]
9098#[derive(Debug, Clone, PartialEq)]
9099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9101#[cfg_attr(feature = "ts", derive(TS))]
9102#[cfg_attr(feature = "ts", ts(export))]
9103pub struct COMMAND_CANCEL_DATA {
9104    #[doc = "Command ID (of command to cancel)."]
9105    pub command: MavCmd,
9106    #[doc = "System executing long running command. Should not be broadcast (0)."]
9107    pub target_system: u8,
9108    #[doc = "Component executing long running command."]
9109    pub target_component: u8,
9110}
9111impl COMMAND_CANCEL_DATA {
9112    pub const ENCODED_LEN: usize = 4usize;
9113    pub const DEFAULT: Self = Self {
9114        command: MavCmd::DEFAULT,
9115        target_system: 0_u8,
9116        target_component: 0_u8,
9117    };
9118    #[cfg(feature = "arbitrary")]
9119    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9120        use arbitrary::{Arbitrary, Unstructured};
9121        let mut buf = [0u8; 1024];
9122        rng.fill_bytes(&mut buf);
9123        let mut unstructured = Unstructured::new(&buf);
9124        Self::arbitrary(&mut unstructured).unwrap_or_default()
9125    }
9126}
9127impl Default for COMMAND_CANCEL_DATA {
9128    fn default() -> Self {
9129        Self::DEFAULT.clone()
9130    }
9131}
9132impl MessageData for COMMAND_CANCEL_DATA {
9133    type Message = MavMessage;
9134    const ID: u32 = 80u32;
9135    const NAME: &'static str = "COMMAND_CANCEL";
9136    const EXTRA_CRC: u8 = 14u8;
9137    const ENCODED_LEN: usize = 4usize;
9138    fn deser(
9139        _version: MavlinkVersion,
9140        __input: &[u8],
9141    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9142        let avail_len = __input.len();
9143        let mut payload_buf = [0; Self::ENCODED_LEN];
9144        let mut buf = if avail_len < Self::ENCODED_LEN {
9145            payload_buf[0..avail_len].copy_from_slice(__input);
9146            Bytes::new(&payload_buf)
9147        } else {
9148            Bytes::new(__input)
9149        };
9150        let mut __struct = Self::default();
9151        let tmp = buf.get_u16_le()?;
9152        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9153            ::mavlink_core::error::ParserError::InvalidEnum {
9154                enum_type: "MavCmd",
9155                value: tmp as u64,
9156            },
9157        )?;
9158        __struct.target_system = buf.get_u8()?;
9159        __struct.target_component = buf.get_u8()?;
9160        Ok(__struct)
9161    }
9162    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9163        let mut __tmp = BytesMut::new(bytes);
9164        #[allow(clippy::absurd_extreme_comparisons)]
9165        #[allow(unused_comparisons)]
9166        if __tmp.remaining() < Self::ENCODED_LEN {
9167            panic!(
9168                "buffer is too small (need {} bytes, but got {})",
9169                Self::ENCODED_LEN,
9170                __tmp.remaining(),
9171            )
9172        }
9173        __tmp.put_u16_le(self.command as u16);
9174        __tmp.put_u8(self.target_system);
9175        __tmp.put_u8(self.target_component);
9176        if matches!(version, MavlinkVersion::V2) {
9177            let len = __tmp.len();
9178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9179        } else {
9180            __tmp.len()
9181        }
9182    }
9183}
9184#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9185#[doc = ""]
9186#[doc = "ID: 75"]
9187#[derive(Debug, Clone, PartialEq)]
9188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9190#[cfg_attr(feature = "ts", derive(TS))]
9191#[cfg_attr(feature = "ts", ts(export))]
9192pub struct COMMAND_INT_DATA {
9193    #[doc = "PARAM1, see MAV_CMD enum"]
9194    pub param1: f32,
9195    #[doc = "PARAM2, see MAV_CMD enum"]
9196    pub param2: f32,
9197    #[doc = "PARAM3, see MAV_CMD enum"]
9198    pub param3: f32,
9199    #[doc = "PARAM4, see MAV_CMD enum"]
9200    pub param4: f32,
9201    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9202    pub x: i32,
9203    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9204    pub y: i32,
9205    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9206    pub z: f32,
9207    #[doc = "The scheduled action for the mission item."]
9208    pub command: MavCmd,
9209    #[doc = "System ID"]
9210    pub target_system: u8,
9211    #[doc = "Component ID"]
9212    pub target_component: u8,
9213    #[doc = "The coordinate system of the COMMAND."]
9214    pub frame: MavFrame,
9215    #[doc = "Not used."]
9216    pub current: u8,
9217    #[doc = "Not used (set 0)."]
9218    pub autocontinue: u8,
9219}
9220impl COMMAND_INT_DATA {
9221    pub const ENCODED_LEN: usize = 35usize;
9222    pub const DEFAULT: Self = Self {
9223        param1: 0.0_f32,
9224        param2: 0.0_f32,
9225        param3: 0.0_f32,
9226        param4: 0.0_f32,
9227        x: 0_i32,
9228        y: 0_i32,
9229        z: 0.0_f32,
9230        command: MavCmd::DEFAULT,
9231        target_system: 0_u8,
9232        target_component: 0_u8,
9233        frame: MavFrame::DEFAULT,
9234        current: 0_u8,
9235        autocontinue: 0_u8,
9236    };
9237    #[cfg(feature = "arbitrary")]
9238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9239        use arbitrary::{Arbitrary, Unstructured};
9240        let mut buf = [0u8; 1024];
9241        rng.fill_bytes(&mut buf);
9242        let mut unstructured = Unstructured::new(&buf);
9243        Self::arbitrary(&mut unstructured).unwrap_or_default()
9244    }
9245}
9246impl Default for COMMAND_INT_DATA {
9247    fn default() -> Self {
9248        Self::DEFAULT.clone()
9249    }
9250}
9251impl MessageData for COMMAND_INT_DATA {
9252    type Message = MavMessage;
9253    const ID: u32 = 75u32;
9254    const NAME: &'static str = "COMMAND_INT";
9255    const EXTRA_CRC: u8 = 158u8;
9256    const ENCODED_LEN: usize = 35usize;
9257    fn deser(
9258        _version: MavlinkVersion,
9259        __input: &[u8],
9260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9261        let avail_len = __input.len();
9262        let mut payload_buf = [0; Self::ENCODED_LEN];
9263        let mut buf = if avail_len < Self::ENCODED_LEN {
9264            payload_buf[0..avail_len].copy_from_slice(__input);
9265            Bytes::new(&payload_buf)
9266        } else {
9267            Bytes::new(__input)
9268        };
9269        let mut __struct = Self::default();
9270        __struct.param1 = buf.get_f32_le()?;
9271        __struct.param2 = buf.get_f32_le()?;
9272        __struct.param3 = buf.get_f32_le()?;
9273        __struct.param4 = buf.get_f32_le()?;
9274        __struct.x = buf.get_i32_le()?;
9275        __struct.y = buf.get_i32_le()?;
9276        __struct.z = buf.get_f32_le()?;
9277        let tmp = buf.get_u16_le()?;
9278        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9279            ::mavlink_core::error::ParserError::InvalidEnum {
9280                enum_type: "MavCmd",
9281                value: tmp as u64,
9282            },
9283        )?;
9284        __struct.target_system = buf.get_u8()?;
9285        __struct.target_component = buf.get_u8()?;
9286        let tmp = buf.get_u8()?;
9287        __struct.frame =
9288            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9289                enum_type: "MavFrame",
9290                value: tmp as u64,
9291            })?;
9292        __struct.current = buf.get_u8()?;
9293        __struct.autocontinue = buf.get_u8()?;
9294        Ok(__struct)
9295    }
9296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9297        let mut __tmp = BytesMut::new(bytes);
9298        #[allow(clippy::absurd_extreme_comparisons)]
9299        #[allow(unused_comparisons)]
9300        if __tmp.remaining() < Self::ENCODED_LEN {
9301            panic!(
9302                "buffer is too small (need {} bytes, but got {})",
9303                Self::ENCODED_LEN,
9304                __tmp.remaining(),
9305            )
9306        }
9307        __tmp.put_f32_le(self.param1);
9308        __tmp.put_f32_le(self.param2);
9309        __tmp.put_f32_le(self.param3);
9310        __tmp.put_f32_le(self.param4);
9311        __tmp.put_i32_le(self.x);
9312        __tmp.put_i32_le(self.y);
9313        __tmp.put_f32_le(self.z);
9314        __tmp.put_u16_le(self.command as u16);
9315        __tmp.put_u8(self.target_system);
9316        __tmp.put_u8(self.target_component);
9317        __tmp.put_u8(self.frame as u8);
9318        __tmp.put_u8(self.current);
9319        __tmp.put_u8(self.autocontinue);
9320        if matches!(version, MavlinkVersion::V2) {
9321            let len = __tmp.len();
9322            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9323        } else {
9324            __tmp.len()
9325        }
9326    }
9327}
9328#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9329#[doc = ""]
9330#[doc = "ID: 76"]
9331#[derive(Debug, Clone, PartialEq)]
9332#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9333#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9334#[cfg_attr(feature = "ts", derive(TS))]
9335#[cfg_attr(feature = "ts", ts(export))]
9336pub struct COMMAND_LONG_DATA {
9337    #[doc = "Parameter 1 (for the specific command)."]
9338    pub param1: f32,
9339    #[doc = "Parameter 2 (for the specific command)."]
9340    pub param2: f32,
9341    #[doc = "Parameter 3 (for the specific command)."]
9342    pub param3: f32,
9343    #[doc = "Parameter 4 (for the specific command)."]
9344    pub param4: f32,
9345    #[doc = "Parameter 5 (for the specific command)."]
9346    pub param5: f32,
9347    #[doc = "Parameter 6 (for the specific command)."]
9348    pub param6: f32,
9349    #[doc = "Parameter 7 (for the specific command)."]
9350    pub param7: f32,
9351    #[doc = "Command ID (of command to send)."]
9352    pub command: MavCmd,
9353    #[doc = "System which should execute the command"]
9354    pub target_system: u8,
9355    #[doc = "Component which should execute the command, 0 for all components"]
9356    pub target_component: u8,
9357    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9358    pub confirmation: u8,
9359}
9360impl COMMAND_LONG_DATA {
9361    pub const ENCODED_LEN: usize = 33usize;
9362    pub const DEFAULT: Self = Self {
9363        param1: 0.0_f32,
9364        param2: 0.0_f32,
9365        param3: 0.0_f32,
9366        param4: 0.0_f32,
9367        param5: 0.0_f32,
9368        param6: 0.0_f32,
9369        param7: 0.0_f32,
9370        command: MavCmd::DEFAULT,
9371        target_system: 0_u8,
9372        target_component: 0_u8,
9373        confirmation: 0_u8,
9374    };
9375    #[cfg(feature = "arbitrary")]
9376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9377        use arbitrary::{Arbitrary, Unstructured};
9378        let mut buf = [0u8; 1024];
9379        rng.fill_bytes(&mut buf);
9380        let mut unstructured = Unstructured::new(&buf);
9381        Self::arbitrary(&mut unstructured).unwrap_or_default()
9382    }
9383}
9384impl Default for COMMAND_LONG_DATA {
9385    fn default() -> Self {
9386        Self::DEFAULT.clone()
9387    }
9388}
9389impl MessageData for COMMAND_LONG_DATA {
9390    type Message = MavMessage;
9391    const ID: u32 = 76u32;
9392    const NAME: &'static str = "COMMAND_LONG";
9393    const EXTRA_CRC: u8 = 152u8;
9394    const ENCODED_LEN: usize = 33usize;
9395    fn deser(
9396        _version: MavlinkVersion,
9397        __input: &[u8],
9398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9399        let avail_len = __input.len();
9400        let mut payload_buf = [0; Self::ENCODED_LEN];
9401        let mut buf = if avail_len < Self::ENCODED_LEN {
9402            payload_buf[0..avail_len].copy_from_slice(__input);
9403            Bytes::new(&payload_buf)
9404        } else {
9405            Bytes::new(__input)
9406        };
9407        let mut __struct = Self::default();
9408        __struct.param1 = buf.get_f32_le()?;
9409        __struct.param2 = buf.get_f32_le()?;
9410        __struct.param3 = buf.get_f32_le()?;
9411        __struct.param4 = buf.get_f32_le()?;
9412        __struct.param5 = buf.get_f32_le()?;
9413        __struct.param6 = buf.get_f32_le()?;
9414        __struct.param7 = buf.get_f32_le()?;
9415        let tmp = buf.get_u16_le()?;
9416        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9417            ::mavlink_core::error::ParserError::InvalidEnum {
9418                enum_type: "MavCmd",
9419                value: tmp as u64,
9420            },
9421        )?;
9422        __struct.target_system = buf.get_u8()?;
9423        __struct.target_component = buf.get_u8()?;
9424        __struct.confirmation = buf.get_u8()?;
9425        Ok(__struct)
9426    }
9427    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9428        let mut __tmp = BytesMut::new(bytes);
9429        #[allow(clippy::absurd_extreme_comparisons)]
9430        #[allow(unused_comparisons)]
9431        if __tmp.remaining() < Self::ENCODED_LEN {
9432            panic!(
9433                "buffer is too small (need {} bytes, but got {})",
9434                Self::ENCODED_LEN,
9435                __tmp.remaining(),
9436            )
9437        }
9438        __tmp.put_f32_le(self.param1);
9439        __tmp.put_f32_le(self.param2);
9440        __tmp.put_f32_le(self.param3);
9441        __tmp.put_f32_le(self.param4);
9442        __tmp.put_f32_le(self.param5);
9443        __tmp.put_f32_le(self.param6);
9444        __tmp.put_f32_le(self.param7);
9445        __tmp.put_u16_le(self.command as u16);
9446        __tmp.put_u8(self.target_system);
9447        __tmp.put_u8(self.target_component);
9448        __tmp.put_u8(self.confirmation);
9449        if matches!(version, MavlinkVersion::V2) {
9450            let len = __tmp.len();
9451            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9452        } else {
9453            __tmp.len()
9454        }
9455    }
9456}
9457#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9458#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9459#[doc = ""]
9460#[doc = "ID: 395"]
9461#[derive(Debug, Clone, PartialEq)]
9462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9464#[cfg_attr(feature = "ts", derive(TS))]
9465#[cfg_attr(feature = "ts", ts(export))]
9466pub struct COMPONENT_INFORMATION_DATA {
9467    #[doc = "Timestamp (time since system boot)."]
9468    pub time_boot_ms: u32,
9469    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9470    pub general_metadata_file_crc: u32,
9471    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9472    pub peripherals_metadata_file_crc: u32,
9473    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9474    #[cfg_attr(feature = "ts", ts(type = "string"))]
9475    pub general_metadata_uri: CharArray<100>,
9476    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9477    #[cfg_attr(feature = "ts", ts(type = "string"))]
9478    pub peripherals_metadata_uri: CharArray<100>,
9479}
9480impl COMPONENT_INFORMATION_DATA {
9481    pub const ENCODED_LEN: usize = 212usize;
9482    pub const DEFAULT: Self = Self {
9483        time_boot_ms: 0_u32,
9484        general_metadata_file_crc: 0_u32,
9485        peripherals_metadata_file_crc: 0_u32,
9486        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9487        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9488    };
9489    #[cfg(feature = "arbitrary")]
9490    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9491        use arbitrary::{Arbitrary, Unstructured};
9492        let mut buf = [0u8; 1024];
9493        rng.fill_bytes(&mut buf);
9494        let mut unstructured = Unstructured::new(&buf);
9495        Self::arbitrary(&mut unstructured).unwrap_or_default()
9496    }
9497}
9498impl Default for COMPONENT_INFORMATION_DATA {
9499    fn default() -> Self {
9500        Self::DEFAULT.clone()
9501    }
9502}
9503impl MessageData for COMPONENT_INFORMATION_DATA {
9504    type Message = MavMessage;
9505    const ID: u32 = 395u32;
9506    const NAME: &'static str = "COMPONENT_INFORMATION";
9507    const EXTRA_CRC: u8 = 0u8;
9508    const ENCODED_LEN: usize = 212usize;
9509    fn deser(
9510        _version: MavlinkVersion,
9511        __input: &[u8],
9512    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9513        let avail_len = __input.len();
9514        let mut payload_buf = [0; Self::ENCODED_LEN];
9515        let mut buf = if avail_len < Self::ENCODED_LEN {
9516            payload_buf[0..avail_len].copy_from_slice(__input);
9517            Bytes::new(&payload_buf)
9518        } else {
9519            Bytes::new(__input)
9520        };
9521        let mut __struct = Self::default();
9522        __struct.time_boot_ms = buf.get_u32_le()?;
9523        __struct.general_metadata_file_crc = buf.get_u32_le()?;
9524        __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
9525        let mut tmp = [0_u8; 100usize];
9526        for v in &mut tmp {
9527            *v = buf.get_u8()?;
9528        }
9529        __struct.general_metadata_uri = CharArray::new(tmp);
9530        let mut tmp = [0_u8; 100usize];
9531        for v in &mut tmp {
9532            *v = buf.get_u8()?;
9533        }
9534        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9535        Ok(__struct)
9536    }
9537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9538        let mut __tmp = BytesMut::new(bytes);
9539        #[allow(clippy::absurd_extreme_comparisons)]
9540        #[allow(unused_comparisons)]
9541        if __tmp.remaining() < Self::ENCODED_LEN {
9542            panic!(
9543                "buffer is too small (need {} bytes, but got {})",
9544                Self::ENCODED_LEN,
9545                __tmp.remaining(),
9546            )
9547        }
9548        __tmp.put_u32_le(self.time_boot_ms);
9549        __tmp.put_u32_le(self.general_metadata_file_crc);
9550        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9551        for val in &self.general_metadata_uri {
9552            __tmp.put_u8(*val);
9553        }
9554        for val in &self.peripherals_metadata_uri {
9555            __tmp.put_u8(*val);
9556        }
9557        if matches!(version, MavlinkVersion::V2) {
9558            let len = __tmp.len();
9559            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9560        } else {
9561            __tmp.len()
9562        }
9563    }
9564}
9565#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9566#[doc = ""]
9567#[doc = "ID: 396"]
9568#[derive(Debug, Clone, PartialEq)]
9569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9571#[cfg_attr(feature = "ts", derive(TS))]
9572#[cfg_attr(feature = "ts", ts(export))]
9573pub struct COMPONENT_INFORMATION_BASIC_DATA {
9574    #[doc = "Component capability flags"]
9575    pub capabilities: MavProtocolCapability,
9576    #[doc = "Timestamp (time since system boot)."]
9577    pub time_boot_ms: u32,
9578    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9579    pub time_manufacture_s: u32,
9580    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9581    #[cfg_attr(feature = "ts", ts(type = "string"))]
9582    pub vendor_name: CharArray<32>,
9583    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9584    #[cfg_attr(feature = "ts", ts(type = "string"))]
9585    pub model_name: CharArray<32>,
9586    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9587    #[cfg_attr(feature = "ts", ts(type = "string"))]
9588    pub software_version: CharArray<24>,
9589    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9590    #[cfg_attr(feature = "ts", ts(type = "string"))]
9591    pub hardware_version: CharArray<24>,
9592    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9593    #[cfg_attr(feature = "ts", ts(type = "string"))]
9594    pub serial_number: CharArray<32>,
9595}
9596impl COMPONENT_INFORMATION_BASIC_DATA {
9597    pub const ENCODED_LEN: usize = 160usize;
9598    pub const DEFAULT: Self = Self {
9599        capabilities: MavProtocolCapability::DEFAULT,
9600        time_boot_ms: 0_u32,
9601        time_manufacture_s: 0_u32,
9602        vendor_name: CharArray::new([0_u8; 32usize]),
9603        model_name: CharArray::new([0_u8; 32usize]),
9604        software_version: CharArray::new([0_u8; 24usize]),
9605        hardware_version: CharArray::new([0_u8; 24usize]),
9606        serial_number: CharArray::new([0_u8; 32usize]),
9607    };
9608    #[cfg(feature = "arbitrary")]
9609    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9610        use arbitrary::{Arbitrary, Unstructured};
9611        let mut buf = [0u8; 1024];
9612        rng.fill_bytes(&mut buf);
9613        let mut unstructured = Unstructured::new(&buf);
9614        Self::arbitrary(&mut unstructured).unwrap_or_default()
9615    }
9616}
9617impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9618    fn default() -> Self {
9619        Self::DEFAULT.clone()
9620    }
9621}
9622impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9623    type Message = MavMessage;
9624    const ID: u32 = 396u32;
9625    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9626    const EXTRA_CRC: u8 = 50u8;
9627    const ENCODED_LEN: usize = 160usize;
9628    fn deser(
9629        _version: MavlinkVersion,
9630        __input: &[u8],
9631    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9632        let avail_len = __input.len();
9633        let mut payload_buf = [0; Self::ENCODED_LEN];
9634        let mut buf = if avail_len < Self::ENCODED_LEN {
9635            payload_buf[0..avail_len].copy_from_slice(__input);
9636            Bytes::new(&payload_buf)
9637        } else {
9638            Bytes::new(__input)
9639        };
9640        let mut __struct = Self::default();
9641        let tmp = buf.get_u64_le()?;
9642        __struct.capabilities = MavProtocolCapability::from_bits(
9643            tmp as <MavProtocolCapability as Flags>::Bits,
9644        )
9645        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9646            flag_type: "MavProtocolCapability",
9647            value: tmp as u64,
9648        })?;
9649        __struct.time_boot_ms = buf.get_u32_le()?;
9650        __struct.time_manufacture_s = buf.get_u32_le()?;
9651        let mut tmp = [0_u8; 32usize];
9652        for v in &mut tmp {
9653            *v = buf.get_u8()?;
9654        }
9655        __struct.vendor_name = CharArray::new(tmp);
9656        let mut tmp = [0_u8; 32usize];
9657        for v in &mut tmp {
9658            *v = buf.get_u8()?;
9659        }
9660        __struct.model_name = CharArray::new(tmp);
9661        let mut tmp = [0_u8; 24usize];
9662        for v in &mut tmp {
9663            *v = buf.get_u8()?;
9664        }
9665        __struct.software_version = CharArray::new(tmp);
9666        let mut tmp = [0_u8; 24usize];
9667        for v in &mut tmp {
9668            *v = buf.get_u8()?;
9669        }
9670        __struct.hardware_version = CharArray::new(tmp);
9671        let mut tmp = [0_u8; 32usize];
9672        for v in &mut tmp {
9673            *v = buf.get_u8()?;
9674        }
9675        __struct.serial_number = CharArray::new(tmp);
9676        Ok(__struct)
9677    }
9678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9679        let mut __tmp = BytesMut::new(bytes);
9680        #[allow(clippy::absurd_extreme_comparisons)]
9681        #[allow(unused_comparisons)]
9682        if __tmp.remaining() < Self::ENCODED_LEN {
9683            panic!(
9684                "buffer is too small (need {} bytes, but got {})",
9685                Self::ENCODED_LEN,
9686                __tmp.remaining(),
9687            )
9688        }
9689        __tmp.put_u64_le(self.capabilities.bits() as u64);
9690        __tmp.put_u32_le(self.time_boot_ms);
9691        __tmp.put_u32_le(self.time_manufacture_s);
9692        for val in &self.vendor_name {
9693            __tmp.put_u8(*val);
9694        }
9695        for val in &self.model_name {
9696            __tmp.put_u8(*val);
9697        }
9698        for val in &self.software_version {
9699            __tmp.put_u8(*val);
9700        }
9701        for val in &self.hardware_version {
9702            __tmp.put_u8(*val);
9703        }
9704        for val in &self.serial_number {
9705            __tmp.put_u8(*val);
9706        }
9707        if matches!(version, MavlinkVersion::V2) {
9708            let len = __tmp.len();
9709            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9710        } else {
9711            __tmp.len()
9712        }
9713    }
9714}
9715#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9716#[doc = ""]
9717#[doc = "ID: 397"]
9718#[derive(Debug, Clone, PartialEq)]
9719#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9720#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9721#[cfg_attr(feature = "ts", derive(TS))]
9722#[cfg_attr(feature = "ts", ts(export))]
9723pub struct COMPONENT_METADATA_DATA {
9724    #[doc = "Timestamp (time since system boot)."]
9725    pub time_boot_ms: u32,
9726    #[doc = "CRC32 of the general metadata file."]
9727    pub file_crc: u32,
9728    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9729    #[cfg_attr(feature = "ts", ts(type = "string"))]
9730    pub uri: CharArray<100>,
9731}
9732impl COMPONENT_METADATA_DATA {
9733    pub const ENCODED_LEN: usize = 108usize;
9734    pub const DEFAULT: Self = Self {
9735        time_boot_ms: 0_u32,
9736        file_crc: 0_u32,
9737        uri: CharArray::new([0_u8; 100usize]),
9738    };
9739    #[cfg(feature = "arbitrary")]
9740    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9741        use arbitrary::{Arbitrary, Unstructured};
9742        let mut buf = [0u8; 1024];
9743        rng.fill_bytes(&mut buf);
9744        let mut unstructured = Unstructured::new(&buf);
9745        Self::arbitrary(&mut unstructured).unwrap_or_default()
9746    }
9747}
9748impl Default for COMPONENT_METADATA_DATA {
9749    fn default() -> Self {
9750        Self::DEFAULT.clone()
9751    }
9752}
9753impl MessageData for COMPONENT_METADATA_DATA {
9754    type Message = MavMessage;
9755    const ID: u32 = 397u32;
9756    const NAME: &'static str = "COMPONENT_METADATA";
9757    const EXTRA_CRC: u8 = 182u8;
9758    const ENCODED_LEN: usize = 108usize;
9759    fn deser(
9760        _version: MavlinkVersion,
9761        __input: &[u8],
9762    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9763        let avail_len = __input.len();
9764        let mut payload_buf = [0; Self::ENCODED_LEN];
9765        let mut buf = if avail_len < Self::ENCODED_LEN {
9766            payload_buf[0..avail_len].copy_from_slice(__input);
9767            Bytes::new(&payload_buf)
9768        } else {
9769            Bytes::new(__input)
9770        };
9771        let mut __struct = Self::default();
9772        __struct.time_boot_ms = buf.get_u32_le()?;
9773        __struct.file_crc = buf.get_u32_le()?;
9774        let mut tmp = [0_u8; 100usize];
9775        for v in &mut tmp {
9776            *v = buf.get_u8()?;
9777        }
9778        __struct.uri = CharArray::new(tmp);
9779        Ok(__struct)
9780    }
9781    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9782        let mut __tmp = BytesMut::new(bytes);
9783        #[allow(clippy::absurd_extreme_comparisons)]
9784        #[allow(unused_comparisons)]
9785        if __tmp.remaining() < Self::ENCODED_LEN {
9786            panic!(
9787                "buffer is too small (need {} bytes, but got {})",
9788                Self::ENCODED_LEN,
9789                __tmp.remaining(),
9790            )
9791        }
9792        __tmp.put_u32_le(self.time_boot_ms);
9793        __tmp.put_u32_le(self.file_crc);
9794        for val in &self.uri {
9795            __tmp.put_u8(*val);
9796        }
9797        if matches!(version, MavlinkVersion::V2) {
9798            let len = __tmp.len();
9799            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9800        } else {
9801            __tmp.len()
9802        }
9803    }
9804}
9805#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9806#[doc = ""]
9807#[doc = "ID: 146"]
9808#[derive(Debug, Clone, PartialEq)]
9809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9811#[cfg_attr(feature = "ts", derive(TS))]
9812#[cfg_attr(feature = "ts", ts(export))]
9813pub struct CONTROL_SYSTEM_STATE_DATA {
9814    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9815    pub time_usec: u64,
9816    #[doc = "X acceleration in body frame"]
9817    pub x_acc: f32,
9818    #[doc = "Y acceleration in body frame"]
9819    pub y_acc: f32,
9820    #[doc = "Z acceleration in body frame"]
9821    pub z_acc: f32,
9822    #[doc = "X velocity in body frame"]
9823    pub x_vel: f32,
9824    #[doc = "Y velocity in body frame"]
9825    pub y_vel: f32,
9826    #[doc = "Z velocity in body frame"]
9827    pub z_vel: f32,
9828    #[doc = "X position in local frame"]
9829    pub x_pos: f32,
9830    #[doc = "Y position in local frame"]
9831    pub y_pos: f32,
9832    #[doc = "Z position in local frame"]
9833    pub z_pos: f32,
9834    #[doc = "Airspeed, set to -1 if unknown"]
9835    pub airspeed: f32,
9836    #[doc = "Variance of body velocity estimate"]
9837    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9838    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9839    pub vel_variance: [f32; 3],
9840    #[doc = "Variance in local position"]
9841    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9842    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9843    pub pos_variance: [f32; 3],
9844    #[doc = "The attitude, represented as Quaternion"]
9845    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9846    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9847    pub q: [f32; 4],
9848    #[doc = "Angular rate in roll axis"]
9849    pub roll_rate: f32,
9850    #[doc = "Angular rate in pitch axis"]
9851    pub pitch_rate: f32,
9852    #[doc = "Angular rate in yaw axis"]
9853    pub yaw_rate: f32,
9854}
9855impl CONTROL_SYSTEM_STATE_DATA {
9856    pub const ENCODED_LEN: usize = 100usize;
9857    pub const DEFAULT: Self = Self {
9858        time_usec: 0_u64,
9859        x_acc: 0.0_f32,
9860        y_acc: 0.0_f32,
9861        z_acc: 0.0_f32,
9862        x_vel: 0.0_f32,
9863        y_vel: 0.0_f32,
9864        z_vel: 0.0_f32,
9865        x_pos: 0.0_f32,
9866        y_pos: 0.0_f32,
9867        z_pos: 0.0_f32,
9868        airspeed: 0.0_f32,
9869        vel_variance: [0.0_f32; 3usize],
9870        pos_variance: [0.0_f32; 3usize],
9871        q: [0.0_f32; 4usize],
9872        roll_rate: 0.0_f32,
9873        pitch_rate: 0.0_f32,
9874        yaw_rate: 0.0_f32,
9875    };
9876    #[cfg(feature = "arbitrary")]
9877    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9878        use arbitrary::{Arbitrary, Unstructured};
9879        let mut buf = [0u8; 1024];
9880        rng.fill_bytes(&mut buf);
9881        let mut unstructured = Unstructured::new(&buf);
9882        Self::arbitrary(&mut unstructured).unwrap_or_default()
9883    }
9884}
9885impl Default for CONTROL_SYSTEM_STATE_DATA {
9886    fn default() -> Self {
9887        Self::DEFAULT.clone()
9888    }
9889}
9890impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9891    type Message = MavMessage;
9892    const ID: u32 = 146u32;
9893    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9894    const EXTRA_CRC: u8 = 103u8;
9895    const ENCODED_LEN: usize = 100usize;
9896    fn deser(
9897        _version: MavlinkVersion,
9898        __input: &[u8],
9899    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9900        let avail_len = __input.len();
9901        let mut payload_buf = [0; Self::ENCODED_LEN];
9902        let mut buf = if avail_len < Self::ENCODED_LEN {
9903            payload_buf[0..avail_len].copy_from_slice(__input);
9904            Bytes::new(&payload_buf)
9905        } else {
9906            Bytes::new(__input)
9907        };
9908        let mut __struct = Self::default();
9909        __struct.time_usec = buf.get_u64_le()?;
9910        __struct.x_acc = buf.get_f32_le()?;
9911        __struct.y_acc = buf.get_f32_le()?;
9912        __struct.z_acc = buf.get_f32_le()?;
9913        __struct.x_vel = buf.get_f32_le()?;
9914        __struct.y_vel = buf.get_f32_le()?;
9915        __struct.z_vel = buf.get_f32_le()?;
9916        __struct.x_pos = buf.get_f32_le()?;
9917        __struct.y_pos = buf.get_f32_le()?;
9918        __struct.z_pos = buf.get_f32_le()?;
9919        __struct.airspeed = buf.get_f32_le()?;
9920        for v in &mut __struct.vel_variance {
9921            let val = buf.get_f32_le()?;
9922            *v = val;
9923        }
9924        for v in &mut __struct.pos_variance {
9925            let val = buf.get_f32_le()?;
9926            *v = val;
9927        }
9928        for v in &mut __struct.q {
9929            let val = buf.get_f32_le()?;
9930            *v = val;
9931        }
9932        __struct.roll_rate = buf.get_f32_le()?;
9933        __struct.pitch_rate = buf.get_f32_le()?;
9934        __struct.yaw_rate = buf.get_f32_le()?;
9935        Ok(__struct)
9936    }
9937    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9938        let mut __tmp = BytesMut::new(bytes);
9939        #[allow(clippy::absurd_extreme_comparisons)]
9940        #[allow(unused_comparisons)]
9941        if __tmp.remaining() < Self::ENCODED_LEN {
9942            panic!(
9943                "buffer is too small (need {} bytes, but got {})",
9944                Self::ENCODED_LEN,
9945                __tmp.remaining(),
9946            )
9947        }
9948        __tmp.put_u64_le(self.time_usec);
9949        __tmp.put_f32_le(self.x_acc);
9950        __tmp.put_f32_le(self.y_acc);
9951        __tmp.put_f32_le(self.z_acc);
9952        __tmp.put_f32_le(self.x_vel);
9953        __tmp.put_f32_le(self.y_vel);
9954        __tmp.put_f32_le(self.z_vel);
9955        __tmp.put_f32_le(self.x_pos);
9956        __tmp.put_f32_le(self.y_pos);
9957        __tmp.put_f32_le(self.z_pos);
9958        __tmp.put_f32_le(self.airspeed);
9959        for val in &self.vel_variance {
9960            __tmp.put_f32_le(*val);
9961        }
9962        for val in &self.pos_variance {
9963            __tmp.put_f32_le(*val);
9964        }
9965        for val in &self.q {
9966            __tmp.put_f32_le(*val);
9967        }
9968        __tmp.put_f32_le(self.roll_rate);
9969        __tmp.put_f32_le(self.pitch_rate);
9970        __tmp.put_f32_le(self.yaw_rate);
9971        if matches!(version, MavlinkVersion::V2) {
9972            let len = __tmp.len();
9973            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9974        } else {
9975            __tmp.len()
9976        }
9977    }
9978}
9979#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9980#[doc = ""]
9981#[doc = "ID: 411"]
9982#[derive(Debug, Clone, PartialEq)]
9983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9985#[cfg_attr(feature = "ts", derive(TS))]
9986#[cfg_attr(feature = "ts", ts(export))]
9987pub struct CURRENT_EVENT_SEQUENCE_DATA {
9988    #[doc = "Sequence number."]
9989    pub sequence: u16,
9990    #[doc = "Flag bitset."]
9991    pub flags: MavEventCurrentSequenceFlags,
9992}
9993impl CURRENT_EVENT_SEQUENCE_DATA {
9994    pub const ENCODED_LEN: usize = 3usize;
9995    pub const DEFAULT: Self = Self {
9996        sequence: 0_u16,
9997        flags: MavEventCurrentSequenceFlags::DEFAULT,
9998    };
9999    #[cfg(feature = "arbitrary")]
10000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10001        use arbitrary::{Arbitrary, Unstructured};
10002        let mut buf = [0u8; 1024];
10003        rng.fill_bytes(&mut buf);
10004        let mut unstructured = Unstructured::new(&buf);
10005        Self::arbitrary(&mut unstructured).unwrap_or_default()
10006    }
10007}
10008impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10009    fn default() -> Self {
10010        Self::DEFAULT.clone()
10011    }
10012}
10013impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10014    type Message = MavMessage;
10015    const ID: u32 = 411u32;
10016    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10017    const EXTRA_CRC: u8 = 106u8;
10018    const ENCODED_LEN: usize = 3usize;
10019    fn deser(
10020        _version: MavlinkVersion,
10021        __input: &[u8],
10022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10023        let avail_len = __input.len();
10024        let mut payload_buf = [0; Self::ENCODED_LEN];
10025        let mut buf = if avail_len < Self::ENCODED_LEN {
10026            payload_buf[0..avail_len].copy_from_slice(__input);
10027            Bytes::new(&payload_buf)
10028        } else {
10029            Bytes::new(__input)
10030        };
10031        let mut __struct = Self::default();
10032        __struct.sequence = buf.get_u16_le()?;
10033        let tmp = buf.get_u8()?;
10034        __struct.flags =
10035            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10036                enum_type: "MavEventCurrentSequenceFlags",
10037                value: tmp as u64,
10038            })?;
10039        Ok(__struct)
10040    }
10041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10042        let mut __tmp = BytesMut::new(bytes);
10043        #[allow(clippy::absurd_extreme_comparisons)]
10044        #[allow(unused_comparisons)]
10045        if __tmp.remaining() < Self::ENCODED_LEN {
10046            panic!(
10047                "buffer is too small (need {} bytes, but got {})",
10048                Self::ENCODED_LEN,
10049                __tmp.remaining(),
10050            )
10051        }
10052        __tmp.put_u16_le(self.sequence);
10053        __tmp.put_u8(self.flags as u8);
10054        if matches!(version, MavlinkVersion::V2) {
10055            let len = __tmp.len();
10056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10057        } else {
10058            __tmp.len()
10059        }
10060    }
10061}
10062#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10063#[doc = ""]
10064#[doc = "ID: 436"]
10065#[derive(Debug, Clone, PartialEq)]
10066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10068#[cfg_attr(feature = "ts", derive(TS))]
10069#[cfg_attr(feature = "ts", ts(export))]
10070pub struct CURRENT_MODE_DATA {
10071    #[doc = "A bitfield for use for autopilot-specific flags"]
10072    pub custom_mode: u32,
10073    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10074    pub intended_custom_mode: u32,
10075    #[doc = "Standard mode."]
10076    pub standard_mode: MavStandardMode,
10077}
10078impl CURRENT_MODE_DATA {
10079    pub const ENCODED_LEN: usize = 9usize;
10080    pub const DEFAULT: Self = Self {
10081        custom_mode: 0_u32,
10082        intended_custom_mode: 0_u32,
10083        standard_mode: MavStandardMode::DEFAULT,
10084    };
10085    #[cfg(feature = "arbitrary")]
10086    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10087        use arbitrary::{Arbitrary, Unstructured};
10088        let mut buf = [0u8; 1024];
10089        rng.fill_bytes(&mut buf);
10090        let mut unstructured = Unstructured::new(&buf);
10091        Self::arbitrary(&mut unstructured).unwrap_or_default()
10092    }
10093}
10094impl Default for CURRENT_MODE_DATA {
10095    fn default() -> Self {
10096        Self::DEFAULT.clone()
10097    }
10098}
10099impl MessageData for CURRENT_MODE_DATA {
10100    type Message = MavMessage;
10101    const ID: u32 = 436u32;
10102    const NAME: &'static str = "CURRENT_MODE";
10103    const EXTRA_CRC: u8 = 193u8;
10104    const ENCODED_LEN: usize = 9usize;
10105    fn deser(
10106        _version: MavlinkVersion,
10107        __input: &[u8],
10108    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10109        let avail_len = __input.len();
10110        let mut payload_buf = [0; Self::ENCODED_LEN];
10111        let mut buf = if avail_len < Self::ENCODED_LEN {
10112            payload_buf[0..avail_len].copy_from_slice(__input);
10113            Bytes::new(&payload_buf)
10114        } else {
10115            Bytes::new(__input)
10116        };
10117        let mut __struct = Self::default();
10118        __struct.custom_mode = buf.get_u32_le()?;
10119        __struct.intended_custom_mode = buf.get_u32_le()?;
10120        let tmp = buf.get_u8()?;
10121        __struct.standard_mode =
10122            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10123                enum_type: "MavStandardMode",
10124                value: tmp as u64,
10125            })?;
10126        Ok(__struct)
10127    }
10128    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10129        let mut __tmp = BytesMut::new(bytes);
10130        #[allow(clippy::absurd_extreme_comparisons)]
10131        #[allow(unused_comparisons)]
10132        if __tmp.remaining() < Self::ENCODED_LEN {
10133            panic!(
10134                "buffer is too small (need {} bytes, but got {})",
10135                Self::ENCODED_LEN,
10136                __tmp.remaining(),
10137            )
10138        }
10139        __tmp.put_u32_le(self.custom_mode);
10140        __tmp.put_u32_le(self.intended_custom_mode);
10141        __tmp.put_u8(self.standard_mode as u8);
10142        if matches!(version, MavlinkVersion::V2) {
10143            let len = __tmp.len();
10144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10145        } else {
10146            __tmp.len()
10147        }
10148    }
10149}
10150#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10151#[doc = "Data stream status information."]
10152#[doc = ""]
10153#[doc = "ID: 67"]
10154#[derive(Debug, Clone, PartialEq)]
10155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10157#[cfg_attr(feature = "ts", derive(TS))]
10158#[cfg_attr(feature = "ts", ts(export))]
10159pub struct DATA_STREAM_DATA {
10160    #[doc = "The message rate"]
10161    pub message_rate: u16,
10162    #[doc = "The ID of the requested data stream"]
10163    pub stream_id: u8,
10164    #[doc = "1 stream is enabled, 0 stream is stopped."]
10165    pub on_off: u8,
10166}
10167impl DATA_STREAM_DATA {
10168    pub const ENCODED_LEN: usize = 4usize;
10169    pub const DEFAULT: Self = Self {
10170        message_rate: 0_u16,
10171        stream_id: 0_u8,
10172        on_off: 0_u8,
10173    };
10174    #[cfg(feature = "arbitrary")]
10175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10176        use arbitrary::{Arbitrary, Unstructured};
10177        let mut buf = [0u8; 1024];
10178        rng.fill_bytes(&mut buf);
10179        let mut unstructured = Unstructured::new(&buf);
10180        Self::arbitrary(&mut unstructured).unwrap_or_default()
10181    }
10182}
10183impl Default for DATA_STREAM_DATA {
10184    fn default() -> Self {
10185        Self::DEFAULT.clone()
10186    }
10187}
10188impl MessageData for DATA_STREAM_DATA {
10189    type Message = MavMessage;
10190    const ID: u32 = 67u32;
10191    const NAME: &'static str = "DATA_STREAM";
10192    const EXTRA_CRC: u8 = 21u8;
10193    const ENCODED_LEN: usize = 4usize;
10194    fn deser(
10195        _version: MavlinkVersion,
10196        __input: &[u8],
10197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10198        let avail_len = __input.len();
10199        let mut payload_buf = [0; Self::ENCODED_LEN];
10200        let mut buf = if avail_len < Self::ENCODED_LEN {
10201            payload_buf[0..avail_len].copy_from_slice(__input);
10202            Bytes::new(&payload_buf)
10203        } else {
10204            Bytes::new(__input)
10205        };
10206        let mut __struct = Self::default();
10207        __struct.message_rate = buf.get_u16_le()?;
10208        __struct.stream_id = buf.get_u8()?;
10209        __struct.on_off = buf.get_u8()?;
10210        Ok(__struct)
10211    }
10212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10213        let mut __tmp = BytesMut::new(bytes);
10214        #[allow(clippy::absurd_extreme_comparisons)]
10215        #[allow(unused_comparisons)]
10216        if __tmp.remaining() < Self::ENCODED_LEN {
10217            panic!(
10218                "buffer is too small (need {} bytes, but got {})",
10219                Self::ENCODED_LEN,
10220                __tmp.remaining(),
10221            )
10222        }
10223        __tmp.put_u16_le(self.message_rate);
10224        __tmp.put_u8(self.stream_id);
10225        __tmp.put_u8(self.on_off);
10226        if matches!(version, MavlinkVersion::V2) {
10227            let len = __tmp.len();
10228            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10229        } else {
10230            __tmp.len()
10231        }
10232    }
10233}
10234#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10235#[doc = ""]
10236#[doc = "ID: 130"]
10237#[derive(Debug, Clone, PartialEq)]
10238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10240#[cfg_attr(feature = "ts", derive(TS))]
10241#[cfg_attr(feature = "ts", ts(export))]
10242pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10243    #[doc = "total data size (set on ACK only)."]
10244    pub size: u32,
10245    #[doc = "Width of a matrix or image."]
10246    pub width: u16,
10247    #[doc = "Height of a matrix or image."]
10248    pub height: u16,
10249    #[doc = "Number of packets being sent (set on ACK only)."]
10250    pub packets: u16,
10251    #[doc = "Type of requested/acknowledged data."]
10252    pub mavtype: MavlinkDataStreamType,
10253    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10254    pub payload: u8,
10255    #[doc = "JPEG quality. Values: [1-100]."]
10256    pub jpg_quality: u8,
10257}
10258impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10259    pub const ENCODED_LEN: usize = 13usize;
10260    pub const DEFAULT: Self = Self {
10261        size: 0_u32,
10262        width: 0_u16,
10263        height: 0_u16,
10264        packets: 0_u16,
10265        mavtype: MavlinkDataStreamType::DEFAULT,
10266        payload: 0_u8,
10267        jpg_quality: 0_u8,
10268    };
10269    #[cfg(feature = "arbitrary")]
10270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10271        use arbitrary::{Arbitrary, Unstructured};
10272        let mut buf = [0u8; 1024];
10273        rng.fill_bytes(&mut buf);
10274        let mut unstructured = Unstructured::new(&buf);
10275        Self::arbitrary(&mut unstructured).unwrap_or_default()
10276    }
10277}
10278impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10279    fn default() -> Self {
10280        Self::DEFAULT.clone()
10281    }
10282}
10283impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10284    type Message = MavMessage;
10285    const ID: u32 = 130u32;
10286    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10287    const EXTRA_CRC: u8 = 29u8;
10288    const ENCODED_LEN: usize = 13usize;
10289    fn deser(
10290        _version: MavlinkVersion,
10291        __input: &[u8],
10292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10293        let avail_len = __input.len();
10294        let mut payload_buf = [0; Self::ENCODED_LEN];
10295        let mut buf = if avail_len < Self::ENCODED_LEN {
10296            payload_buf[0..avail_len].copy_from_slice(__input);
10297            Bytes::new(&payload_buf)
10298        } else {
10299            Bytes::new(__input)
10300        };
10301        let mut __struct = Self::default();
10302        __struct.size = buf.get_u32_le()?;
10303        __struct.width = buf.get_u16_le()?;
10304        __struct.height = buf.get_u16_le()?;
10305        __struct.packets = buf.get_u16_le()?;
10306        let tmp = buf.get_u8()?;
10307        __struct.mavtype =
10308            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10309                enum_type: "MavlinkDataStreamType",
10310                value: tmp as u64,
10311            })?;
10312        __struct.payload = buf.get_u8()?;
10313        __struct.jpg_quality = buf.get_u8()?;
10314        Ok(__struct)
10315    }
10316    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10317        let mut __tmp = BytesMut::new(bytes);
10318        #[allow(clippy::absurd_extreme_comparisons)]
10319        #[allow(unused_comparisons)]
10320        if __tmp.remaining() < Self::ENCODED_LEN {
10321            panic!(
10322                "buffer is too small (need {} bytes, but got {})",
10323                Self::ENCODED_LEN,
10324                __tmp.remaining(),
10325            )
10326        }
10327        __tmp.put_u32_le(self.size);
10328        __tmp.put_u16_le(self.width);
10329        __tmp.put_u16_le(self.height);
10330        __tmp.put_u16_le(self.packets);
10331        __tmp.put_u8(self.mavtype as u8);
10332        __tmp.put_u8(self.payload);
10333        __tmp.put_u8(self.jpg_quality);
10334        if matches!(version, MavlinkVersion::V2) {
10335            let len = __tmp.len();
10336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10337        } else {
10338            __tmp.len()
10339        }
10340    }
10341}
10342#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10343#[doc = ""]
10344#[doc = "ID: 254"]
10345#[derive(Debug, Clone, PartialEq)]
10346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10348#[cfg_attr(feature = "ts", derive(TS))]
10349#[cfg_attr(feature = "ts", ts(export))]
10350pub struct DEBUG_DATA {
10351    #[doc = "Timestamp (time since system boot)."]
10352    pub time_boot_ms: u32,
10353    #[doc = "DEBUG value"]
10354    pub value: f32,
10355    #[doc = "index of debug variable"]
10356    pub ind: u8,
10357}
10358impl DEBUG_DATA {
10359    pub const ENCODED_LEN: usize = 9usize;
10360    pub const DEFAULT: Self = Self {
10361        time_boot_ms: 0_u32,
10362        value: 0.0_f32,
10363        ind: 0_u8,
10364    };
10365    #[cfg(feature = "arbitrary")]
10366    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10367        use arbitrary::{Arbitrary, Unstructured};
10368        let mut buf = [0u8; 1024];
10369        rng.fill_bytes(&mut buf);
10370        let mut unstructured = Unstructured::new(&buf);
10371        Self::arbitrary(&mut unstructured).unwrap_or_default()
10372    }
10373}
10374impl Default for DEBUG_DATA {
10375    fn default() -> Self {
10376        Self::DEFAULT.clone()
10377    }
10378}
10379impl MessageData for DEBUG_DATA {
10380    type Message = MavMessage;
10381    const ID: u32 = 254u32;
10382    const NAME: &'static str = "DEBUG";
10383    const EXTRA_CRC: u8 = 46u8;
10384    const ENCODED_LEN: usize = 9usize;
10385    fn deser(
10386        _version: MavlinkVersion,
10387        __input: &[u8],
10388    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10389        let avail_len = __input.len();
10390        let mut payload_buf = [0; Self::ENCODED_LEN];
10391        let mut buf = if avail_len < Self::ENCODED_LEN {
10392            payload_buf[0..avail_len].copy_from_slice(__input);
10393            Bytes::new(&payload_buf)
10394        } else {
10395            Bytes::new(__input)
10396        };
10397        let mut __struct = Self::default();
10398        __struct.time_boot_ms = buf.get_u32_le()?;
10399        __struct.value = buf.get_f32_le()?;
10400        __struct.ind = buf.get_u8()?;
10401        Ok(__struct)
10402    }
10403    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10404        let mut __tmp = BytesMut::new(bytes);
10405        #[allow(clippy::absurd_extreme_comparisons)]
10406        #[allow(unused_comparisons)]
10407        if __tmp.remaining() < Self::ENCODED_LEN {
10408            panic!(
10409                "buffer is too small (need {} bytes, but got {})",
10410                Self::ENCODED_LEN,
10411                __tmp.remaining(),
10412            )
10413        }
10414        __tmp.put_u32_le(self.time_boot_ms);
10415        __tmp.put_f32_le(self.value);
10416        __tmp.put_u8(self.ind);
10417        if matches!(version, MavlinkVersion::V2) {
10418            let len = __tmp.len();
10419            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10420        } else {
10421            __tmp.len()
10422        }
10423    }
10424}
10425#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10426#[doc = ""]
10427#[doc = "ID: 350"]
10428#[derive(Debug, Clone, PartialEq)]
10429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10431#[cfg_attr(feature = "ts", derive(TS))]
10432#[cfg_attr(feature = "ts", ts(export))]
10433pub struct DEBUG_FLOAT_ARRAY_DATA {
10434    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10435    pub time_usec: u64,
10436    #[doc = "Unique ID used to discriminate between arrays"]
10437    pub array_id: u16,
10438    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10439    #[cfg_attr(feature = "ts", ts(type = "string"))]
10440    pub name: CharArray<10>,
10441    #[doc = "data"]
10442    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10443    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10444    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10445    pub data: [f32; 58],
10446}
10447impl DEBUG_FLOAT_ARRAY_DATA {
10448    pub const ENCODED_LEN: usize = 252usize;
10449    pub const DEFAULT: Self = Self {
10450        time_usec: 0_u64,
10451        array_id: 0_u16,
10452        name: CharArray::new([0_u8; 10usize]),
10453        data: [0.0_f32; 58usize],
10454    };
10455    #[cfg(feature = "arbitrary")]
10456    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10457        use arbitrary::{Arbitrary, Unstructured};
10458        let mut buf = [0u8; 1024];
10459        rng.fill_bytes(&mut buf);
10460        let mut unstructured = Unstructured::new(&buf);
10461        Self::arbitrary(&mut unstructured).unwrap_or_default()
10462    }
10463}
10464impl Default for DEBUG_FLOAT_ARRAY_DATA {
10465    fn default() -> Self {
10466        Self::DEFAULT.clone()
10467    }
10468}
10469impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10470    type Message = MavMessage;
10471    const ID: u32 = 350u32;
10472    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10473    const EXTRA_CRC: u8 = 232u8;
10474    const ENCODED_LEN: usize = 252usize;
10475    fn deser(
10476        _version: MavlinkVersion,
10477        __input: &[u8],
10478    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10479        let avail_len = __input.len();
10480        let mut payload_buf = [0; Self::ENCODED_LEN];
10481        let mut buf = if avail_len < Self::ENCODED_LEN {
10482            payload_buf[0..avail_len].copy_from_slice(__input);
10483            Bytes::new(&payload_buf)
10484        } else {
10485            Bytes::new(__input)
10486        };
10487        let mut __struct = Self::default();
10488        __struct.time_usec = buf.get_u64_le()?;
10489        __struct.array_id = buf.get_u16_le()?;
10490        let mut tmp = [0_u8; 10usize];
10491        for v in &mut tmp {
10492            *v = buf.get_u8()?;
10493        }
10494        __struct.name = CharArray::new(tmp);
10495        for v in &mut __struct.data {
10496            let val = buf.get_f32_le()?;
10497            *v = val;
10498        }
10499        Ok(__struct)
10500    }
10501    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10502        let mut __tmp = BytesMut::new(bytes);
10503        #[allow(clippy::absurd_extreme_comparisons)]
10504        #[allow(unused_comparisons)]
10505        if __tmp.remaining() < Self::ENCODED_LEN {
10506            panic!(
10507                "buffer is too small (need {} bytes, but got {})",
10508                Self::ENCODED_LEN,
10509                __tmp.remaining(),
10510            )
10511        }
10512        __tmp.put_u64_le(self.time_usec);
10513        __tmp.put_u16_le(self.array_id);
10514        for val in &self.name {
10515            __tmp.put_u8(*val);
10516        }
10517        if matches!(version, MavlinkVersion::V2) {
10518            for val in &self.data {
10519                __tmp.put_f32_le(*val);
10520            }
10521            let len = __tmp.len();
10522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10523        } else {
10524            __tmp.len()
10525        }
10526    }
10527}
10528#[doc = "To debug something using a named 3D vector."]
10529#[doc = ""]
10530#[doc = "ID: 250"]
10531#[derive(Debug, Clone, PartialEq)]
10532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10534#[cfg_attr(feature = "ts", derive(TS))]
10535#[cfg_attr(feature = "ts", ts(export))]
10536pub struct DEBUG_VECT_DATA {
10537    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10538    pub time_usec: u64,
10539    #[doc = "x"]
10540    pub x: f32,
10541    #[doc = "y"]
10542    pub y: f32,
10543    #[doc = "z"]
10544    pub z: f32,
10545    #[doc = "Name"]
10546    #[cfg_attr(feature = "ts", ts(type = "string"))]
10547    pub name: CharArray<10>,
10548}
10549impl DEBUG_VECT_DATA {
10550    pub const ENCODED_LEN: usize = 30usize;
10551    pub const DEFAULT: Self = Self {
10552        time_usec: 0_u64,
10553        x: 0.0_f32,
10554        y: 0.0_f32,
10555        z: 0.0_f32,
10556        name: CharArray::new([0_u8; 10usize]),
10557    };
10558    #[cfg(feature = "arbitrary")]
10559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10560        use arbitrary::{Arbitrary, Unstructured};
10561        let mut buf = [0u8; 1024];
10562        rng.fill_bytes(&mut buf);
10563        let mut unstructured = Unstructured::new(&buf);
10564        Self::arbitrary(&mut unstructured).unwrap_or_default()
10565    }
10566}
10567impl Default for DEBUG_VECT_DATA {
10568    fn default() -> Self {
10569        Self::DEFAULT.clone()
10570    }
10571}
10572impl MessageData for DEBUG_VECT_DATA {
10573    type Message = MavMessage;
10574    const ID: u32 = 250u32;
10575    const NAME: &'static str = "DEBUG_VECT";
10576    const EXTRA_CRC: u8 = 49u8;
10577    const ENCODED_LEN: usize = 30usize;
10578    fn deser(
10579        _version: MavlinkVersion,
10580        __input: &[u8],
10581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10582        let avail_len = __input.len();
10583        let mut payload_buf = [0; Self::ENCODED_LEN];
10584        let mut buf = if avail_len < Self::ENCODED_LEN {
10585            payload_buf[0..avail_len].copy_from_slice(__input);
10586            Bytes::new(&payload_buf)
10587        } else {
10588            Bytes::new(__input)
10589        };
10590        let mut __struct = Self::default();
10591        __struct.time_usec = buf.get_u64_le()?;
10592        __struct.x = buf.get_f32_le()?;
10593        __struct.y = buf.get_f32_le()?;
10594        __struct.z = buf.get_f32_le()?;
10595        let mut tmp = [0_u8; 10usize];
10596        for v in &mut tmp {
10597            *v = buf.get_u8()?;
10598        }
10599        __struct.name = CharArray::new(tmp);
10600        Ok(__struct)
10601    }
10602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10603        let mut __tmp = BytesMut::new(bytes);
10604        #[allow(clippy::absurd_extreme_comparisons)]
10605        #[allow(unused_comparisons)]
10606        if __tmp.remaining() < Self::ENCODED_LEN {
10607            panic!(
10608                "buffer is too small (need {} bytes, but got {})",
10609                Self::ENCODED_LEN,
10610                __tmp.remaining(),
10611            )
10612        }
10613        __tmp.put_u64_le(self.time_usec);
10614        __tmp.put_f32_le(self.x);
10615        __tmp.put_f32_le(self.y);
10616        __tmp.put_f32_le(self.z);
10617        for val in &self.name {
10618            __tmp.put_u8(*val);
10619        }
10620        if matches!(version, MavlinkVersion::V2) {
10621            let len = __tmp.len();
10622            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10623        } else {
10624            __tmp.len()
10625        }
10626    }
10627}
10628#[doc = "Distance sensor information for an onboard rangefinder."]
10629#[doc = ""]
10630#[doc = "ID: 132"]
10631#[derive(Debug, Clone, PartialEq)]
10632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10634#[cfg_attr(feature = "ts", derive(TS))]
10635#[cfg_attr(feature = "ts", ts(export))]
10636pub struct DISTANCE_SENSOR_DATA {
10637    #[doc = "Timestamp (time since system boot)."]
10638    pub time_boot_ms: u32,
10639    #[doc = "Minimum distance the sensor can measure"]
10640    pub min_distance: u16,
10641    #[doc = "Maximum distance the sensor can measure"]
10642    pub max_distance: u16,
10643    #[doc = "Current distance reading"]
10644    pub current_distance: u16,
10645    #[doc = "Type of distance sensor."]
10646    pub mavtype: MavDistanceSensor,
10647    #[doc = "Onboard ID of the sensor"]
10648    pub id: u8,
10649    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10650    pub orientation: MavSensorOrientation,
10651    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10652    pub covariance: u8,
10653    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10654    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10655    pub horizontal_fov: f32,
10656    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10657    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10658    pub vertical_fov: f32,
10659    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10660    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10661    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10662    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10663    pub quaternion: [f32; 4],
10664    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10665    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10666    pub signal_quality: u8,
10667}
10668impl DISTANCE_SENSOR_DATA {
10669    pub const ENCODED_LEN: usize = 39usize;
10670    pub const DEFAULT: Self = Self {
10671        time_boot_ms: 0_u32,
10672        min_distance: 0_u16,
10673        max_distance: 0_u16,
10674        current_distance: 0_u16,
10675        mavtype: MavDistanceSensor::DEFAULT,
10676        id: 0_u8,
10677        orientation: MavSensorOrientation::DEFAULT,
10678        covariance: 0_u8,
10679        horizontal_fov: 0.0_f32,
10680        vertical_fov: 0.0_f32,
10681        quaternion: [0.0_f32; 4usize],
10682        signal_quality: 0_u8,
10683    };
10684    #[cfg(feature = "arbitrary")]
10685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10686        use arbitrary::{Arbitrary, Unstructured};
10687        let mut buf = [0u8; 1024];
10688        rng.fill_bytes(&mut buf);
10689        let mut unstructured = Unstructured::new(&buf);
10690        Self::arbitrary(&mut unstructured).unwrap_or_default()
10691    }
10692}
10693impl Default for DISTANCE_SENSOR_DATA {
10694    fn default() -> Self {
10695        Self::DEFAULT.clone()
10696    }
10697}
10698impl MessageData for DISTANCE_SENSOR_DATA {
10699    type Message = MavMessage;
10700    const ID: u32 = 132u32;
10701    const NAME: &'static str = "DISTANCE_SENSOR";
10702    const EXTRA_CRC: u8 = 85u8;
10703    const ENCODED_LEN: usize = 39usize;
10704    fn deser(
10705        _version: MavlinkVersion,
10706        __input: &[u8],
10707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10708        let avail_len = __input.len();
10709        let mut payload_buf = [0; Self::ENCODED_LEN];
10710        let mut buf = if avail_len < Self::ENCODED_LEN {
10711            payload_buf[0..avail_len].copy_from_slice(__input);
10712            Bytes::new(&payload_buf)
10713        } else {
10714            Bytes::new(__input)
10715        };
10716        let mut __struct = Self::default();
10717        __struct.time_boot_ms = buf.get_u32_le()?;
10718        __struct.min_distance = buf.get_u16_le()?;
10719        __struct.max_distance = buf.get_u16_le()?;
10720        __struct.current_distance = buf.get_u16_le()?;
10721        let tmp = buf.get_u8()?;
10722        __struct.mavtype =
10723            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10724                enum_type: "MavDistanceSensor",
10725                value: tmp as u64,
10726            })?;
10727        __struct.id = buf.get_u8()?;
10728        let tmp = buf.get_u8()?;
10729        __struct.orientation =
10730            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10731                enum_type: "MavSensorOrientation",
10732                value: tmp as u64,
10733            })?;
10734        __struct.covariance = buf.get_u8()?;
10735        __struct.horizontal_fov = buf.get_f32_le()?;
10736        __struct.vertical_fov = buf.get_f32_le()?;
10737        for v in &mut __struct.quaternion {
10738            let val = buf.get_f32_le()?;
10739            *v = val;
10740        }
10741        __struct.signal_quality = buf.get_u8()?;
10742        Ok(__struct)
10743    }
10744    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10745        let mut __tmp = BytesMut::new(bytes);
10746        #[allow(clippy::absurd_extreme_comparisons)]
10747        #[allow(unused_comparisons)]
10748        if __tmp.remaining() < Self::ENCODED_LEN {
10749            panic!(
10750                "buffer is too small (need {} bytes, but got {})",
10751                Self::ENCODED_LEN,
10752                __tmp.remaining(),
10753            )
10754        }
10755        __tmp.put_u32_le(self.time_boot_ms);
10756        __tmp.put_u16_le(self.min_distance);
10757        __tmp.put_u16_le(self.max_distance);
10758        __tmp.put_u16_le(self.current_distance);
10759        __tmp.put_u8(self.mavtype as u8);
10760        __tmp.put_u8(self.id);
10761        __tmp.put_u8(self.orientation as u8);
10762        __tmp.put_u8(self.covariance);
10763        if matches!(version, MavlinkVersion::V2) {
10764            __tmp.put_f32_le(self.horizontal_fov);
10765            __tmp.put_f32_le(self.vertical_fov);
10766            for val in &self.quaternion {
10767                __tmp.put_f32_le(*val);
10768            }
10769            __tmp.put_u8(self.signal_quality);
10770            let len = __tmp.len();
10771            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10772        } else {
10773            __tmp.len()
10774        }
10775    }
10776}
10777#[doc = "EFI status output."]
10778#[doc = ""]
10779#[doc = "ID: 225"]
10780#[derive(Debug, Clone, PartialEq)]
10781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10783#[cfg_attr(feature = "ts", derive(TS))]
10784#[cfg_attr(feature = "ts", ts(export))]
10785pub struct EFI_STATUS_DATA {
10786    #[doc = "ECU index"]
10787    pub ecu_index: f32,
10788    #[doc = "RPM"]
10789    pub rpm: f32,
10790    #[doc = "Fuel consumed"]
10791    pub fuel_consumed: f32,
10792    #[doc = "Fuel flow rate"]
10793    pub fuel_flow: f32,
10794    #[doc = "Engine load"]
10795    pub engine_load: f32,
10796    #[doc = "Throttle position"]
10797    pub throttle_position: f32,
10798    #[doc = "Spark dwell time"]
10799    pub spark_dwell_time: f32,
10800    #[doc = "Barometric pressure"]
10801    pub barometric_pressure: f32,
10802    #[doc = "Intake manifold pressure("]
10803    pub intake_manifold_pressure: f32,
10804    #[doc = "Intake manifold temperature"]
10805    pub intake_manifold_temperature: f32,
10806    #[doc = "Cylinder head temperature"]
10807    pub cylinder_head_temperature: f32,
10808    #[doc = "Ignition timing (Crank angle degrees)"]
10809    pub ignition_timing: f32,
10810    #[doc = "Injection time"]
10811    pub injection_time: f32,
10812    #[doc = "Exhaust gas temperature"]
10813    pub exhaust_gas_temperature: f32,
10814    #[doc = "Output throttle"]
10815    pub throttle_out: f32,
10816    #[doc = "Pressure/temperature compensation"]
10817    pub pt_compensation: f32,
10818    #[doc = "EFI health status"]
10819    pub health: u8,
10820    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10821    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10822    pub ignition_voltage: f32,
10823    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10824    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10825    pub fuel_pressure: f32,
10826}
10827impl EFI_STATUS_DATA {
10828    pub const ENCODED_LEN: usize = 73usize;
10829    pub const DEFAULT: Self = Self {
10830        ecu_index: 0.0_f32,
10831        rpm: 0.0_f32,
10832        fuel_consumed: 0.0_f32,
10833        fuel_flow: 0.0_f32,
10834        engine_load: 0.0_f32,
10835        throttle_position: 0.0_f32,
10836        spark_dwell_time: 0.0_f32,
10837        barometric_pressure: 0.0_f32,
10838        intake_manifold_pressure: 0.0_f32,
10839        intake_manifold_temperature: 0.0_f32,
10840        cylinder_head_temperature: 0.0_f32,
10841        ignition_timing: 0.0_f32,
10842        injection_time: 0.0_f32,
10843        exhaust_gas_temperature: 0.0_f32,
10844        throttle_out: 0.0_f32,
10845        pt_compensation: 0.0_f32,
10846        health: 0_u8,
10847        ignition_voltage: 0.0_f32,
10848        fuel_pressure: 0.0_f32,
10849    };
10850    #[cfg(feature = "arbitrary")]
10851    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10852        use arbitrary::{Arbitrary, Unstructured};
10853        let mut buf = [0u8; 1024];
10854        rng.fill_bytes(&mut buf);
10855        let mut unstructured = Unstructured::new(&buf);
10856        Self::arbitrary(&mut unstructured).unwrap_or_default()
10857    }
10858}
10859impl Default for EFI_STATUS_DATA {
10860    fn default() -> Self {
10861        Self::DEFAULT.clone()
10862    }
10863}
10864impl MessageData for EFI_STATUS_DATA {
10865    type Message = MavMessage;
10866    const ID: u32 = 225u32;
10867    const NAME: &'static str = "EFI_STATUS";
10868    const EXTRA_CRC: u8 = 208u8;
10869    const ENCODED_LEN: usize = 73usize;
10870    fn deser(
10871        _version: MavlinkVersion,
10872        __input: &[u8],
10873    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10874        let avail_len = __input.len();
10875        let mut payload_buf = [0; Self::ENCODED_LEN];
10876        let mut buf = if avail_len < Self::ENCODED_LEN {
10877            payload_buf[0..avail_len].copy_from_slice(__input);
10878            Bytes::new(&payload_buf)
10879        } else {
10880            Bytes::new(__input)
10881        };
10882        let mut __struct = Self::default();
10883        __struct.ecu_index = buf.get_f32_le()?;
10884        __struct.rpm = buf.get_f32_le()?;
10885        __struct.fuel_consumed = buf.get_f32_le()?;
10886        __struct.fuel_flow = buf.get_f32_le()?;
10887        __struct.engine_load = buf.get_f32_le()?;
10888        __struct.throttle_position = buf.get_f32_le()?;
10889        __struct.spark_dwell_time = buf.get_f32_le()?;
10890        __struct.barometric_pressure = buf.get_f32_le()?;
10891        __struct.intake_manifold_pressure = buf.get_f32_le()?;
10892        __struct.intake_manifold_temperature = buf.get_f32_le()?;
10893        __struct.cylinder_head_temperature = buf.get_f32_le()?;
10894        __struct.ignition_timing = buf.get_f32_le()?;
10895        __struct.injection_time = buf.get_f32_le()?;
10896        __struct.exhaust_gas_temperature = buf.get_f32_le()?;
10897        __struct.throttle_out = buf.get_f32_le()?;
10898        __struct.pt_compensation = buf.get_f32_le()?;
10899        __struct.health = buf.get_u8()?;
10900        __struct.ignition_voltage = buf.get_f32_le()?;
10901        __struct.fuel_pressure = buf.get_f32_le()?;
10902        Ok(__struct)
10903    }
10904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10905        let mut __tmp = BytesMut::new(bytes);
10906        #[allow(clippy::absurd_extreme_comparisons)]
10907        #[allow(unused_comparisons)]
10908        if __tmp.remaining() < Self::ENCODED_LEN {
10909            panic!(
10910                "buffer is too small (need {} bytes, but got {})",
10911                Self::ENCODED_LEN,
10912                __tmp.remaining(),
10913            )
10914        }
10915        __tmp.put_f32_le(self.ecu_index);
10916        __tmp.put_f32_le(self.rpm);
10917        __tmp.put_f32_le(self.fuel_consumed);
10918        __tmp.put_f32_le(self.fuel_flow);
10919        __tmp.put_f32_le(self.engine_load);
10920        __tmp.put_f32_le(self.throttle_position);
10921        __tmp.put_f32_le(self.spark_dwell_time);
10922        __tmp.put_f32_le(self.barometric_pressure);
10923        __tmp.put_f32_le(self.intake_manifold_pressure);
10924        __tmp.put_f32_le(self.intake_manifold_temperature);
10925        __tmp.put_f32_le(self.cylinder_head_temperature);
10926        __tmp.put_f32_le(self.ignition_timing);
10927        __tmp.put_f32_le(self.injection_time);
10928        __tmp.put_f32_le(self.exhaust_gas_temperature);
10929        __tmp.put_f32_le(self.throttle_out);
10930        __tmp.put_f32_le(self.pt_compensation);
10931        __tmp.put_u8(self.health);
10932        if matches!(version, MavlinkVersion::V2) {
10933            __tmp.put_f32_le(self.ignition_voltage);
10934            __tmp.put_f32_le(self.fuel_pressure);
10935            let len = __tmp.len();
10936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10937        } else {
10938            __tmp.len()
10939        }
10940    }
10941}
10942#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10943#[doc = ""]
10944#[doc = "ID: 131"]
10945#[derive(Debug, Clone, PartialEq)]
10946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10948#[cfg_attr(feature = "ts", derive(TS))]
10949#[cfg_attr(feature = "ts", ts(export))]
10950pub struct ENCAPSULATED_DATA_DATA {
10951    #[doc = "sequence number (starting with 0 on every transmission)"]
10952    pub seqnr: u16,
10953    #[doc = "image data bytes"]
10954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10955    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10956    pub data: [u8; 253],
10957}
10958impl ENCAPSULATED_DATA_DATA {
10959    pub const ENCODED_LEN: usize = 255usize;
10960    pub const DEFAULT: Self = Self {
10961        seqnr: 0_u16,
10962        data: [0_u8; 253usize],
10963    };
10964    #[cfg(feature = "arbitrary")]
10965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10966        use arbitrary::{Arbitrary, Unstructured};
10967        let mut buf = [0u8; 1024];
10968        rng.fill_bytes(&mut buf);
10969        let mut unstructured = Unstructured::new(&buf);
10970        Self::arbitrary(&mut unstructured).unwrap_or_default()
10971    }
10972}
10973impl Default for ENCAPSULATED_DATA_DATA {
10974    fn default() -> Self {
10975        Self::DEFAULT.clone()
10976    }
10977}
10978impl MessageData for ENCAPSULATED_DATA_DATA {
10979    type Message = MavMessage;
10980    const ID: u32 = 131u32;
10981    const NAME: &'static str = "ENCAPSULATED_DATA";
10982    const EXTRA_CRC: u8 = 223u8;
10983    const ENCODED_LEN: usize = 255usize;
10984    fn deser(
10985        _version: MavlinkVersion,
10986        __input: &[u8],
10987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10988        let avail_len = __input.len();
10989        let mut payload_buf = [0; Self::ENCODED_LEN];
10990        let mut buf = if avail_len < Self::ENCODED_LEN {
10991            payload_buf[0..avail_len].copy_from_slice(__input);
10992            Bytes::new(&payload_buf)
10993        } else {
10994            Bytes::new(__input)
10995        };
10996        let mut __struct = Self::default();
10997        __struct.seqnr = buf.get_u16_le()?;
10998        for v in &mut __struct.data {
10999            let val = buf.get_u8()?;
11000            *v = val;
11001        }
11002        Ok(__struct)
11003    }
11004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11005        let mut __tmp = BytesMut::new(bytes);
11006        #[allow(clippy::absurd_extreme_comparisons)]
11007        #[allow(unused_comparisons)]
11008        if __tmp.remaining() < Self::ENCODED_LEN {
11009            panic!(
11010                "buffer is too small (need {} bytes, but got {})",
11011                Self::ENCODED_LEN,
11012                __tmp.remaining(),
11013            )
11014        }
11015        __tmp.put_u16_le(self.seqnr);
11016        for val in &self.data {
11017            __tmp.put_u8(*val);
11018        }
11019        if matches!(version, MavlinkVersion::V2) {
11020            let len = __tmp.len();
11021            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11022        } else {
11023            __tmp.len()
11024        }
11025    }
11026}
11027#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11028#[doc = ""]
11029#[doc = "ID: 290"]
11030#[derive(Debug, Clone, PartialEq)]
11031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11033#[cfg_attr(feature = "ts", derive(TS))]
11034#[cfg_attr(feature = "ts", ts(export))]
11035pub struct ESC_INFO_DATA {
11036    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11037    pub time_usec: u64,
11038    #[doc = "Number of reported errors by each ESC since boot."]
11039    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11040    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11041    pub error_count: [u32; 4],
11042    #[doc = "Counter of data packets received."]
11043    pub counter: u16,
11044    #[doc = "Bitmap of ESC failure flags."]
11045    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11046    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11047    pub failure_flags: [u16; 4],
11048    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11049    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11050    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11051    pub temperature: [i16; 4],
11052    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11053    pub index: u8,
11054    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11055    pub count: u8,
11056    #[doc = "Connection type protocol for all ESC."]
11057    pub connection_type: EscConnectionType,
11058    #[doc = "Information regarding online/offline status of each ESC."]
11059    pub info: u8,
11060}
11061impl ESC_INFO_DATA {
11062    pub const ENCODED_LEN: usize = 46usize;
11063    pub const DEFAULT: Self = Self {
11064        time_usec: 0_u64,
11065        error_count: [0_u32; 4usize],
11066        counter: 0_u16,
11067        failure_flags: [0_u16; 4usize],
11068        temperature: [0_i16; 4usize],
11069        index: 0_u8,
11070        count: 0_u8,
11071        connection_type: EscConnectionType::DEFAULT,
11072        info: 0_u8,
11073    };
11074    #[cfg(feature = "arbitrary")]
11075    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11076        use arbitrary::{Arbitrary, Unstructured};
11077        let mut buf = [0u8; 1024];
11078        rng.fill_bytes(&mut buf);
11079        let mut unstructured = Unstructured::new(&buf);
11080        Self::arbitrary(&mut unstructured).unwrap_or_default()
11081    }
11082}
11083impl Default for ESC_INFO_DATA {
11084    fn default() -> Self {
11085        Self::DEFAULT.clone()
11086    }
11087}
11088impl MessageData for ESC_INFO_DATA {
11089    type Message = MavMessage;
11090    const ID: u32 = 290u32;
11091    const NAME: &'static str = "ESC_INFO";
11092    const EXTRA_CRC: u8 = 251u8;
11093    const ENCODED_LEN: usize = 46usize;
11094    fn deser(
11095        _version: MavlinkVersion,
11096        __input: &[u8],
11097    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11098        let avail_len = __input.len();
11099        let mut payload_buf = [0; Self::ENCODED_LEN];
11100        let mut buf = if avail_len < Self::ENCODED_LEN {
11101            payload_buf[0..avail_len].copy_from_slice(__input);
11102            Bytes::new(&payload_buf)
11103        } else {
11104            Bytes::new(__input)
11105        };
11106        let mut __struct = Self::default();
11107        __struct.time_usec = buf.get_u64_le()?;
11108        for v in &mut __struct.error_count {
11109            let val = buf.get_u32_le()?;
11110            *v = val;
11111        }
11112        __struct.counter = buf.get_u16_le()?;
11113        for v in &mut __struct.failure_flags {
11114            let val = buf.get_u16_le()?;
11115            *v = val;
11116        }
11117        for v in &mut __struct.temperature {
11118            let val = buf.get_i16_le()?;
11119            *v = val;
11120        }
11121        __struct.index = buf.get_u8()?;
11122        __struct.count = buf.get_u8()?;
11123        let tmp = buf.get_u8()?;
11124        __struct.connection_type =
11125            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11126                enum_type: "EscConnectionType",
11127                value: tmp as u64,
11128            })?;
11129        __struct.info = buf.get_u8()?;
11130        Ok(__struct)
11131    }
11132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11133        let mut __tmp = BytesMut::new(bytes);
11134        #[allow(clippy::absurd_extreme_comparisons)]
11135        #[allow(unused_comparisons)]
11136        if __tmp.remaining() < Self::ENCODED_LEN {
11137            panic!(
11138                "buffer is too small (need {} bytes, but got {})",
11139                Self::ENCODED_LEN,
11140                __tmp.remaining(),
11141            )
11142        }
11143        __tmp.put_u64_le(self.time_usec);
11144        for val in &self.error_count {
11145            __tmp.put_u32_le(*val);
11146        }
11147        __tmp.put_u16_le(self.counter);
11148        for val in &self.failure_flags {
11149            __tmp.put_u16_le(*val);
11150        }
11151        for val in &self.temperature {
11152            __tmp.put_i16_le(*val);
11153        }
11154        __tmp.put_u8(self.index);
11155        __tmp.put_u8(self.count);
11156        __tmp.put_u8(self.connection_type as u8);
11157        __tmp.put_u8(self.info);
11158        if matches!(version, MavlinkVersion::V2) {
11159            let len = __tmp.len();
11160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11161        } else {
11162            __tmp.len()
11163        }
11164    }
11165}
11166#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11167#[doc = ""]
11168#[doc = "ID: 291"]
11169#[derive(Debug, Clone, PartialEq)]
11170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11172#[cfg_attr(feature = "ts", derive(TS))]
11173#[cfg_attr(feature = "ts", ts(export))]
11174pub struct ESC_STATUS_DATA {
11175    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11176    pub time_usec: u64,
11177    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11178    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11179    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11180    pub rpm: [i32; 4],
11181    #[doc = "Voltage measured from each ESC."]
11182    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11183    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11184    pub voltage: [f32; 4],
11185    #[doc = "Current measured from each ESC."]
11186    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11187    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11188    pub current: [f32; 4],
11189    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11190    pub index: u8,
11191}
11192impl ESC_STATUS_DATA {
11193    pub const ENCODED_LEN: usize = 57usize;
11194    pub const DEFAULT: Self = Self {
11195        time_usec: 0_u64,
11196        rpm: [0_i32; 4usize],
11197        voltage: [0.0_f32; 4usize],
11198        current: [0.0_f32; 4usize],
11199        index: 0_u8,
11200    };
11201    #[cfg(feature = "arbitrary")]
11202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11203        use arbitrary::{Arbitrary, Unstructured};
11204        let mut buf = [0u8; 1024];
11205        rng.fill_bytes(&mut buf);
11206        let mut unstructured = Unstructured::new(&buf);
11207        Self::arbitrary(&mut unstructured).unwrap_or_default()
11208    }
11209}
11210impl Default for ESC_STATUS_DATA {
11211    fn default() -> Self {
11212        Self::DEFAULT.clone()
11213    }
11214}
11215impl MessageData for ESC_STATUS_DATA {
11216    type Message = MavMessage;
11217    const ID: u32 = 291u32;
11218    const NAME: &'static str = "ESC_STATUS";
11219    const EXTRA_CRC: u8 = 10u8;
11220    const ENCODED_LEN: usize = 57usize;
11221    fn deser(
11222        _version: MavlinkVersion,
11223        __input: &[u8],
11224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11225        let avail_len = __input.len();
11226        let mut payload_buf = [0; Self::ENCODED_LEN];
11227        let mut buf = if avail_len < Self::ENCODED_LEN {
11228            payload_buf[0..avail_len].copy_from_slice(__input);
11229            Bytes::new(&payload_buf)
11230        } else {
11231            Bytes::new(__input)
11232        };
11233        let mut __struct = Self::default();
11234        __struct.time_usec = buf.get_u64_le()?;
11235        for v in &mut __struct.rpm {
11236            let val = buf.get_i32_le()?;
11237            *v = val;
11238        }
11239        for v in &mut __struct.voltage {
11240            let val = buf.get_f32_le()?;
11241            *v = val;
11242        }
11243        for v in &mut __struct.current {
11244            let val = buf.get_f32_le()?;
11245            *v = val;
11246        }
11247        __struct.index = buf.get_u8()?;
11248        Ok(__struct)
11249    }
11250    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11251        let mut __tmp = BytesMut::new(bytes);
11252        #[allow(clippy::absurd_extreme_comparisons)]
11253        #[allow(unused_comparisons)]
11254        if __tmp.remaining() < Self::ENCODED_LEN {
11255            panic!(
11256                "buffer is too small (need {} bytes, but got {})",
11257                Self::ENCODED_LEN,
11258                __tmp.remaining(),
11259            )
11260        }
11261        __tmp.put_u64_le(self.time_usec);
11262        for val in &self.rpm {
11263            __tmp.put_i32_le(*val);
11264        }
11265        for val in &self.voltage {
11266            __tmp.put_f32_le(*val);
11267        }
11268        for val in &self.current {
11269            __tmp.put_f32_le(*val);
11270        }
11271        __tmp.put_u8(self.index);
11272        if matches!(version, MavlinkVersion::V2) {
11273            let len = __tmp.len();
11274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11275        } else {
11276            __tmp.len()
11277        }
11278    }
11279}
11280#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11281#[doc = ""]
11282#[doc = "ID: 230"]
11283#[derive(Debug, Clone, PartialEq)]
11284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11286#[cfg_attr(feature = "ts", derive(TS))]
11287#[cfg_attr(feature = "ts", ts(export))]
11288pub struct ESTIMATOR_STATUS_DATA {
11289    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11290    pub time_usec: u64,
11291    #[doc = "Velocity innovation test ratio"]
11292    pub vel_ratio: f32,
11293    #[doc = "Horizontal position innovation test ratio"]
11294    pub pos_horiz_ratio: f32,
11295    #[doc = "Vertical position innovation test ratio"]
11296    pub pos_vert_ratio: f32,
11297    #[doc = "Magnetometer innovation test ratio"]
11298    pub mag_ratio: f32,
11299    #[doc = "Height above terrain innovation test ratio"]
11300    pub hagl_ratio: f32,
11301    #[doc = "True airspeed innovation test ratio"]
11302    pub tas_ratio: f32,
11303    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11304    pub pos_horiz_accuracy: f32,
11305    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11306    pub pos_vert_accuracy: f32,
11307    #[doc = "Bitmap indicating which EKF outputs are valid."]
11308    pub flags: EstimatorStatusFlags,
11309}
11310impl ESTIMATOR_STATUS_DATA {
11311    pub const ENCODED_LEN: usize = 42usize;
11312    pub const DEFAULT: Self = Self {
11313        time_usec: 0_u64,
11314        vel_ratio: 0.0_f32,
11315        pos_horiz_ratio: 0.0_f32,
11316        pos_vert_ratio: 0.0_f32,
11317        mag_ratio: 0.0_f32,
11318        hagl_ratio: 0.0_f32,
11319        tas_ratio: 0.0_f32,
11320        pos_horiz_accuracy: 0.0_f32,
11321        pos_vert_accuracy: 0.0_f32,
11322        flags: EstimatorStatusFlags::DEFAULT,
11323    };
11324    #[cfg(feature = "arbitrary")]
11325    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11326        use arbitrary::{Arbitrary, Unstructured};
11327        let mut buf = [0u8; 1024];
11328        rng.fill_bytes(&mut buf);
11329        let mut unstructured = Unstructured::new(&buf);
11330        Self::arbitrary(&mut unstructured).unwrap_or_default()
11331    }
11332}
11333impl Default for ESTIMATOR_STATUS_DATA {
11334    fn default() -> Self {
11335        Self::DEFAULT.clone()
11336    }
11337}
11338impl MessageData for ESTIMATOR_STATUS_DATA {
11339    type Message = MavMessage;
11340    const ID: u32 = 230u32;
11341    const NAME: &'static str = "ESTIMATOR_STATUS";
11342    const EXTRA_CRC: u8 = 163u8;
11343    const ENCODED_LEN: usize = 42usize;
11344    fn deser(
11345        _version: MavlinkVersion,
11346        __input: &[u8],
11347    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11348        let avail_len = __input.len();
11349        let mut payload_buf = [0; Self::ENCODED_LEN];
11350        let mut buf = if avail_len < Self::ENCODED_LEN {
11351            payload_buf[0..avail_len].copy_from_slice(__input);
11352            Bytes::new(&payload_buf)
11353        } else {
11354            Bytes::new(__input)
11355        };
11356        let mut __struct = Self::default();
11357        __struct.time_usec = buf.get_u64_le()?;
11358        __struct.vel_ratio = buf.get_f32_le()?;
11359        __struct.pos_horiz_ratio = buf.get_f32_le()?;
11360        __struct.pos_vert_ratio = buf.get_f32_le()?;
11361        __struct.mag_ratio = buf.get_f32_le()?;
11362        __struct.hagl_ratio = buf.get_f32_le()?;
11363        __struct.tas_ratio = buf.get_f32_le()?;
11364        __struct.pos_horiz_accuracy = buf.get_f32_le()?;
11365        __struct.pos_vert_accuracy = buf.get_f32_le()?;
11366        let tmp = buf.get_u16_le()?;
11367        __struct.flags = EstimatorStatusFlags::from_bits(
11368            tmp as <EstimatorStatusFlags as Flags>::Bits,
11369        )
11370        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11371            flag_type: "EstimatorStatusFlags",
11372            value: tmp as u64,
11373        })?;
11374        Ok(__struct)
11375    }
11376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11377        let mut __tmp = BytesMut::new(bytes);
11378        #[allow(clippy::absurd_extreme_comparisons)]
11379        #[allow(unused_comparisons)]
11380        if __tmp.remaining() < Self::ENCODED_LEN {
11381            panic!(
11382                "buffer is too small (need {} bytes, but got {})",
11383                Self::ENCODED_LEN,
11384                __tmp.remaining(),
11385            )
11386        }
11387        __tmp.put_u64_le(self.time_usec);
11388        __tmp.put_f32_le(self.vel_ratio);
11389        __tmp.put_f32_le(self.pos_horiz_ratio);
11390        __tmp.put_f32_le(self.pos_vert_ratio);
11391        __tmp.put_f32_le(self.mag_ratio);
11392        __tmp.put_f32_le(self.hagl_ratio);
11393        __tmp.put_f32_le(self.tas_ratio);
11394        __tmp.put_f32_le(self.pos_horiz_accuracy);
11395        __tmp.put_f32_le(self.pos_vert_accuracy);
11396        __tmp.put_u16_le(self.flags.bits() as u16);
11397        if matches!(version, MavlinkVersion::V2) {
11398            let len = __tmp.len();
11399            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11400        } else {
11401            __tmp.len()
11402        }
11403    }
11404}
11405#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11406#[doc = ""]
11407#[doc = "ID: 410"]
11408#[derive(Debug, Clone, PartialEq)]
11409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11411#[cfg_attr(feature = "ts", derive(TS))]
11412#[cfg_attr(feature = "ts", ts(export))]
11413pub struct EVENT_DATA {
11414    #[doc = "Event ID (as defined in the component metadata)"]
11415    pub id: u32,
11416    #[doc = "Timestamp (time since system boot when the event happened)."]
11417    pub event_time_boot_ms: u32,
11418    #[doc = "Sequence number."]
11419    pub sequence: u16,
11420    #[doc = "Component ID"]
11421    pub destination_component: u8,
11422    #[doc = "System ID"]
11423    pub destination_system: u8,
11424    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11425    pub log_levels: u8,
11426    #[doc = "Arguments (depend on event ID)."]
11427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11428    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11429    pub arguments: [u8; 40],
11430}
11431impl EVENT_DATA {
11432    pub const ENCODED_LEN: usize = 53usize;
11433    pub const DEFAULT: Self = Self {
11434        id: 0_u32,
11435        event_time_boot_ms: 0_u32,
11436        sequence: 0_u16,
11437        destination_component: 0_u8,
11438        destination_system: 0_u8,
11439        log_levels: 0_u8,
11440        arguments: [0_u8; 40usize],
11441    };
11442    #[cfg(feature = "arbitrary")]
11443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11444        use arbitrary::{Arbitrary, Unstructured};
11445        let mut buf = [0u8; 1024];
11446        rng.fill_bytes(&mut buf);
11447        let mut unstructured = Unstructured::new(&buf);
11448        Self::arbitrary(&mut unstructured).unwrap_or_default()
11449    }
11450}
11451impl Default for EVENT_DATA {
11452    fn default() -> Self {
11453        Self::DEFAULT.clone()
11454    }
11455}
11456impl MessageData for EVENT_DATA {
11457    type Message = MavMessage;
11458    const ID: u32 = 410u32;
11459    const NAME: &'static str = "EVENT";
11460    const EXTRA_CRC: u8 = 160u8;
11461    const ENCODED_LEN: usize = 53usize;
11462    fn deser(
11463        _version: MavlinkVersion,
11464        __input: &[u8],
11465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11466        let avail_len = __input.len();
11467        let mut payload_buf = [0; Self::ENCODED_LEN];
11468        let mut buf = if avail_len < Self::ENCODED_LEN {
11469            payload_buf[0..avail_len].copy_from_slice(__input);
11470            Bytes::new(&payload_buf)
11471        } else {
11472            Bytes::new(__input)
11473        };
11474        let mut __struct = Self::default();
11475        __struct.id = buf.get_u32_le()?;
11476        __struct.event_time_boot_ms = buf.get_u32_le()?;
11477        __struct.sequence = buf.get_u16_le()?;
11478        __struct.destination_component = buf.get_u8()?;
11479        __struct.destination_system = buf.get_u8()?;
11480        __struct.log_levels = buf.get_u8()?;
11481        for v in &mut __struct.arguments {
11482            let val = buf.get_u8()?;
11483            *v = val;
11484        }
11485        Ok(__struct)
11486    }
11487    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11488        let mut __tmp = BytesMut::new(bytes);
11489        #[allow(clippy::absurd_extreme_comparisons)]
11490        #[allow(unused_comparisons)]
11491        if __tmp.remaining() < Self::ENCODED_LEN {
11492            panic!(
11493                "buffer is too small (need {} bytes, but got {})",
11494                Self::ENCODED_LEN,
11495                __tmp.remaining(),
11496            )
11497        }
11498        __tmp.put_u32_le(self.id);
11499        __tmp.put_u32_le(self.event_time_boot_ms);
11500        __tmp.put_u16_le(self.sequence);
11501        __tmp.put_u8(self.destination_component);
11502        __tmp.put_u8(self.destination_system);
11503        __tmp.put_u8(self.log_levels);
11504        for val in &self.arguments {
11505            __tmp.put_u8(*val);
11506        }
11507        if matches!(version, MavlinkVersion::V2) {
11508            let len = __tmp.len();
11509            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11510        } else {
11511            __tmp.len()
11512        }
11513    }
11514}
11515#[doc = "Provides state for additional features."]
11516#[doc = ""]
11517#[doc = "ID: 245"]
11518#[derive(Debug, Clone, PartialEq)]
11519#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11521#[cfg_attr(feature = "ts", derive(TS))]
11522#[cfg_attr(feature = "ts", ts(export))]
11523pub struct EXTENDED_SYS_STATE_DATA {
11524    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11525    pub vtol_state: MavVtolState,
11526    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11527    pub landed_state: MavLandedState,
11528}
11529impl EXTENDED_SYS_STATE_DATA {
11530    pub const ENCODED_LEN: usize = 2usize;
11531    pub const DEFAULT: Self = Self {
11532        vtol_state: MavVtolState::DEFAULT,
11533        landed_state: MavLandedState::DEFAULT,
11534    };
11535    #[cfg(feature = "arbitrary")]
11536    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11537        use arbitrary::{Arbitrary, Unstructured};
11538        let mut buf = [0u8; 1024];
11539        rng.fill_bytes(&mut buf);
11540        let mut unstructured = Unstructured::new(&buf);
11541        Self::arbitrary(&mut unstructured).unwrap_or_default()
11542    }
11543}
11544impl Default for EXTENDED_SYS_STATE_DATA {
11545    fn default() -> Self {
11546        Self::DEFAULT.clone()
11547    }
11548}
11549impl MessageData for EXTENDED_SYS_STATE_DATA {
11550    type Message = MavMessage;
11551    const ID: u32 = 245u32;
11552    const NAME: &'static str = "EXTENDED_SYS_STATE";
11553    const EXTRA_CRC: u8 = 130u8;
11554    const ENCODED_LEN: usize = 2usize;
11555    fn deser(
11556        _version: MavlinkVersion,
11557        __input: &[u8],
11558    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11559        let avail_len = __input.len();
11560        let mut payload_buf = [0; Self::ENCODED_LEN];
11561        let mut buf = if avail_len < Self::ENCODED_LEN {
11562            payload_buf[0..avail_len].copy_from_slice(__input);
11563            Bytes::new(&payload_buf)
11564        } else {
11565            Bytes::new(__input)
11566        };
11567        let mut __struct = Self::default();
11568        let tmp = buf.get_u8()?;
11569        __struct.vtol_state =
11570            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11571                enum_type: "MavVtolState",
11572                value: tmp as u64,
11573            })?;
11574        let tmp = buf.get_u8()?;
11575        __struct.landed_state =
11576            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11577                enum_type: "MavLandedState",
11578                value: tmp as u64,
11579            })?;
11580        Ok(__struct)
11581    }
11582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11583        let mut __tmp = BytesMut::new(bytes);
11584        #[allow(clippy::absurd_extreme_comparisons)]
11585        #[allow(unused_comparisons)]
11586        if __tmp.remaining() < Self::ENCODED_LEN {
11587            panic!(
11588                "buffer is too small (need {} bytes, but got {})",
11589                Self::ENCODED_LEN,
11590                __tmp.remaining(),
11591            )
11592        }
11593        __tmp.put_u8(self.vtol_state as u8);
11594        __tmp.put_u8(self.landed_state as u8);
11595        if matches!(version, MavlinkVersion::V2) {
11596            let len = __tmp.len();
11597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11598        } else {
11599            __tmp.len()
11600        }
11601    }
11602}
11603#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11604#[doc = ""]
11605#[doc = "ID: 162"]
11606#[derive(Debug, Clone, PartialEq)]
11607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11609#[cfg_attr(feature = "ts", derive(TS))]
11610#[cfg_attr(feature = "ts", ts(export))]
11611pub struct FENCE_STATUS_DATA {
11612    #[doc = "Time (since boot) of last breach."]
11613    pub breach_time: u32,
11614    #[doc = "Number of fence breaches."]
11615    pub breach_count: u16,
11616    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11617    pub breach_status: u8,
11618    #[doc = "Last breach type."]
11619    pub breach_type: FenceBreach,
11620    #[doc = "Active action to prevent fence breach"]
11621    #[cfg_attr(feature = "serde", serde(default))]
11622    pub breach_mitigation: FenceMitigate,
11623}
11624impl FENCE_STATUS_DATA {
11625    pub const ENCODED_LEN: usize = 9usize;
11626    pub const DEFAULT: Self = Self {
11627        breach_time: 0_u32,
11628        breach_count: 0_u16,
11629        breach_status: 0_u8,
11630        breach_type: FenceBreach::DEFAULT,
11631        breach_mitigation: FenceMitigate::DEFAULT,
11632    };
11633    #[cfg(feature = "arbitrary")]
11634    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11635        use arbitrary::{Arbitrary, Unstructured};
11636        let mut buf = [0u8; 1024];
11637        rng.fill_bytes(&mut buf);
11638        let mut unstructured = Unstructured::new(&buf);
11639        Self::arbitrary(&mut unstructured).unwrap_or_default()
11640    }
11641}
11642impl Default for FENCE_STATUS_DATA {
11643    fn default() -> Self {
11644        Self::DEFAULT.clone()
11645    }
11646}
11647impl MessageData for FENCE_STATUS_DATA {
11648    type Message = MavMessage;
11649    const ID: u32 = 162u32;
11650    const NAME: &'static str = "FENCE_STATUS";
11651    const EXTRA_CRC: u8 = 189u8;
11652    const ENCODED_LEN: usize = 9usize;
11653    fn deser(
11654        _version: MavlinkVersion,
11655        __input: &[u8],
11656    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11657        let avail_len = __input.len();
11658        let mut payload_buf = [0; Self::ENCODED_LEN];
11659        let mut buf = if avail_len < Self::ENCODED_LEN {
11660            payload_buf[0..avail_len].copy_from_slice(__input);
11661            Bytes::new(&payload_buf)
11662        } else {
11663            Bytes::new(__input)
11664        };
11665        let mut __struct = Self::default();
11666        __struct.breach_time = buf.get_u32_le()?;
11667        __struct.breach_count = buf.get_u16_le()?;
11668        __struct.breach_status = buf.get_u8()?;
11669        let tmp = buf.get_u8()?;
11670        __struct.breach_type =
11671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11672                enum_type: "FenceBreach",
11673                value: tmp as u64,
11674            })?;
11675        let tmp = buf.get_u8()?;
11676        __struct.breach_mitigation =
11677            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11678                enum_type: "FenceMitigate",
11679                value: tmp as u64,
11680            })?;
11681        Ok(__struct)
11682    }
11683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11684        let mut __tmp = BytesMut::new(bytes);
11685        #[allow(clippy::absurd_extreme_comparisons)]
11686        #[allow(unused_comparisons)]
11687        if __tmp.remaining() < Self::ENCODED_LEN {
11688            panic!(
11689                "buffer is too small (need {} bytes, but got {})",
11690                Self::ENCODED_LEN,
11691                __tmp.remaining(),
11692            )
11693        }
11694        __tmp.put_u32_le(self.breach_time);
11695        __tmp.put_u16_le(self.breach_count);
11696        __tmp.put_u8(self.breach_status);
11697        __tmp.put_u8(self.breach_type as u8);
11698        if matches!(version, MavlinkVersion::V2) {
11699            __tmp.put_u8(self.breach_mitigation as u8);
11700            let len = __tmp.len();
11701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11702        } else {
11703            __tmp.len()
11704        }
11705    }
11706}
11707#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11708#[doc = ""]
11709#[doc = "ID: 110"]
11710#[derive(Debug, Clone, PartialEq)]
11711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11713#[cfg_attr(feature = "ts", derive(TS))]
11714#[cfg_attr(feature = "ts", ts(export))]
11715pub struct FILE_TRANSFER_PROTOCOL_DATA {
11716    #[doc = "Network ID (0 for broadcast)"]
11717    pub target_network: u8,
11718    #[doc = "System ID (0 for broadcast)"]
11719    pub target_system: u8,
11720    #[doc = "Component ID (0 for broadcast)"]
11721    pub target_component: u8,
11722    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11723    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11724    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11725    pub payload: [u8; 251],
11726}
11727impl FILE_TRANSFER_PROTOCOL_DATA {
11728    pub const ENCODED_LEN: usize = 254usize;
11729    pub const DEFAULT: Self = Self {
11730        target_network: 0_u8,
11731        target_system: 0_u8,
11732        target_component: 0_u8,
11733        payload: [0_u8; 251usize],
11734    };
11735    #[cfg(feature = "arbitrary")]
11736    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11737        use arbitrary::{Arbitrary, Unstructured};
11738        let mut buf = [0u8; 1024];
11739        rng.fill_bytes(&mut buf);
11740        let mut unstructured = Unstructured::new(&buf);
11741        Self::arbitrary(&mut unstructured).unwrap_or_default()
11742    }
11743}
11744impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11745    fn default() -> Self {
11746        Self::DEFAULT.clone()
11747    }
11748}
11749impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11750    type Message = MavMessage;
11751    const ID: u32 = 110u32;
11752    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11753    const EXTRA_CRC: u8 = 84u8;
11754    const ENCODED_LEN: usize = 254usize;
11755    fn deser(
11756        _version: MavlinkVersion,
11757        __input: &[u8],
11758    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11759        let avail_len = __input.len();
11760        let mut payload_buf = [0; Self::ENCODED_LEN];
11761        let mut buf = if avail_len < Self::ENCODED_LEN {
11762            payload_buf[0..avail_len].copy_from_slice(__input);
11763            Bytes::new(&payload_buf)
11764        } else {
11765            Bytes::new(__input)
11766        };
11767        let mut __struct = Self::default();
11768        __struct.target_network = buf.get_u8()?;
11769        __struct.target_system = buf.get_u8()?;
11770        __struct.target_component = buf.get_u8()?;
11771        for v in &mut __struct.payload {
11772            let val = buf.get_u8()?;
11773            *v = val;
11774        }
11775        Ok(__struct)
11776    }
11777    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11778        let mut __tmp = BytesMut::new(bytes);
11779        #[allow(clippy::absurd_extreme_comparisons)]
11780        #[allow(unused_comparisons)]
11781        if __tmp.remaining() < Self::ENCODED_LEN {
11782            panic!(
11783                "buffer is too small (need {} bytes, but got {})",
11784                Self::ENCODED_LEN,
11785                __tmp.remaining(),
11786            )
11787        }
11788        __tmp.put_u8(self.target_network);
11789        __tmp.put_u8(self.target_system);
11790        __tmp.put_u8(self.target_component);
11791        for val in &self.payload {
11792            __tmp.put_u8(*val);
11793        }
11794        if matches!(version, MavlinkVersion::V2) {
11795            let len = __tmp.len();
11796            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11797        } else {
11798            __tmp.len()
11799        }
11800    }
11801}
11802#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11803#[doc = ""]
11804#[doc = "ID: 264"]
11805#[derive(Debug, Clone, PartialEq)]
11806#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11808#[cfg_attr(feature = "ts", derive(TS))]
11809#[cfg_attr(feature = "ts", ts(export))]
11810pub struct FLIGHT_INFORMATION_DATA {
11811    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11812    pub arming_time_utc: u64,
11813    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11814    pub takeoff_time_utc: u64,
11815    #[doc = "Flight number. Note, field is misnamed UUID."]
11816    pub flight_uuid: u64,
11817    #[doc = "Timestamp (time since system boot)."]
11818    pub time_boot_ms: u32,
11819    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11820    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11821    pub landing_time: u32,
11822}
11823impl FLIGHT_INFORMATION_DATA {
11824    pub const ENCODED_LEN: usize = 32usize;
11825    pub const DEFAULT: Self = Self {
11826        arming_time_utc: 0_u64,
11827        takeoff_time_utc: 0_u64,
11828        flight_uuid: 0_u64,
11829        time_boot_ms: 0_u32,
11830        landing_time: 0_u32,
11831    };
11832    #[cfg(feature = "arbitrary")]
11833    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11834        use arbitrary::{Arbitrary, Unstructured};
11835        let mut buf = [0u8; 1024];
11836        rng.fill_bytes(&mut buf);
11837        let mut unstructured = Unstructured::new(&buf);
11838        Self::arbitrary(&mut unstructured).unwrap_or_default()
11839    }
11840}
11841impl Default for FLIGHT_INFORMATION_DATA {
11842    fn default() -> Self {
11843        Self::DEFAULT.clone()
11844    }
11845}
11846impl MessageData for FLIGHT_INFORMATION_DATA {
11847    type Message = MavMessage;
11848    const ID: u32 = 264u32;
11849    const NAME: &'static str = "FLIGHT_INFORMATION";
11850    const EXTRA_CRC: u8 = 49u8;
11851    const ENCODED_LEN: usize = 32usize;
11852    fn deser(
11853        _version: MavlinkVersion,
11854        __input: &[u8],
11855    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11856        let avail_len = __input.len();
11857        let mut payload_buf = [0; Self::ENCODED_LEN];
11858        let mut buf = if avail_len < Self::ENCODED_LEN {
11859            payload_buf[0..avail_len].copy_from_slice(__input);
11860            Bytes::new(&payload_buf)
11861        } else {
11862            Bytes::new(__input)
11863        };
11864        let mut __struct = Self::default();
11865        __struct.arming_time_utc = buf.get_u64_le()?;
11866        __struct.takeoff_time_utc = buf.get_u64_le()?;
11867        __struct.flight_uuid = buf.get_u64_le()?;
11868        __struct.time_boot_ms = buf.get_u32_le()?;
11869        __struct.landing_time = buf.get_u32_le()?;
11870        Ok(__struct)
11871    }
11872    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11873        let mut __tmp = BytesMut::new(bytes);
11874        #[allow(clippy::absurd_extreme_comparisons)]
11875        #[allow(unused_comparisons)]
11876        if __tmp.remaining() < Self::ENCODED_LEN {
11877            panic!(
11878                "buffer is too small (need {} bytes, but got {})",
11879                Self::ENCODED_LEN,
11880                __tmp.remaining(),
11881            )
11882        }
11883        __tmp.put_u64_le(self.arming_time_utc);
11884        __tmp.put_u64_le(self.takeoff_time_utc);
11885        __tmp.put_u64_le(self.flight_uuid);
11886        __tmp.put_u32_le(self.time_boot_ms);
11887        if matches!(version, MavlinkVersion::V2) {
11888            __tmp.put_u32_le(self.landing_time);
11889            let len = __tmp.len();
11890            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11891        } else {
11892            __tmp.len()
11893        }
11894    }
11895}
11896#[doc = "Current motion information from a designated system."]
11897#[doc = ""]
11898#[doc = "ID: 144"]
11899#[derive(Debug, Clone, PartialEq)]
11900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11902#[cfg_attr(feature = "ts", derive(TS))]
11903#[cfg_attr(feature = "ts", ts(export))]
11904pub struct FOLLOW_TARGET_DATA {
11905    #[doc = "Timestamp (time since system boot)."]
11906    pub timestamp: u64,
11907    #[doc = "button states or switches of a tracker device"]
11908    pub custom_state: u64,
11909    #[doc = "Latitude (WGS84)"]
11910    pub lat: i32,
11911    #[doc = "Longitude (WGS84)"]
11912    pub lon: i32,
11913    #[doc = "Altitude (MSL)"]
11914    pub alt: f32,
11915    #[doc = "target velocity (0,0,0) for unknown"]
11916    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11917    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11918    pub vel: [f32; 3],
11919    #[doc = "linear target acceleration (0,0,0) for unknown"]
11920    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11921    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11922    pub acc: [f32; 3],
11923    #[doc = "(0 0 0 0 for unknown)"]
11924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11925    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11926    pub attitude_q: [f32; 4],
11927    #[doc = "(0 0 0 for unknown)"]
11928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11930    pub rates: [f32; 3],
11931    #[doc = "eph epv"]
11932    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11933    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11934    pub position_cov: [f32; 3],
11935    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11936    pub est_capabilities: u8,
11937}
11938impl FOLLOW_TARGET_DATA {
11939    pub const ENCODED_LEN: usize = 93usize;
11940    pub const DEFAULT: Self = Self {
11941        timestamp: 0_u64,
11942        custom_state: 0_u64,
11943        lat: 0_i32,
11944        lon: 0_i32,
11945        alt: 0.0_f32,
11946        vel: [0.0_f32; 3usize],
11947        acc: [0.0_f32; 3usize],
11948        attitude_q: [0.0_f32; 4usize],
11949        rates: [0.0_f32; 3usize],
11950        position_cov: [0.0_f32; 3usize],
11951        est_capabilities: 0_u8,
11952    };
11953    #[cfg(feature = "arbitrary")]
11954    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11955        use arbitrary::{Arbitrary, Unstructured};
11956        let mut buf = [0u8; 1024];
11957        rng.fill_bytes(&mut buf);
11958        let mut unstructured = Unstructured::new(&buf);
11959        Self::arbitrary(&mut unstructured).unwrap_or_default()
11960    }
11961}
11962impl Default for FOLLOW_TARGET_DATA {
11963    fn default() -> Self {
11964        Self::DEFAULT.clone()
11965    }
11966}
11967impl MessageData for FOLLOW_TARGET_DATA {
11968    type Message = MavMessage;
11969    const ID: u32 = 144u32;
11970    const NAME: &'static str = "FOLLOW_TARGET";
11971    const EXTRA_CRC: u8 = 127u8;
11972    const ENCODED_LEN: usize = 93usize;
11973    fn deser(
11974        _version: MavlinkVersion,
11975        __input: &[u8],
11976    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11977        let avail_len = __input.len();
11978        let mut payload_buf = [0; Self::ENCODED_LEN];
11979        let mut buf = if avail_len < Self::ENCODED_LEN {
11980            payload_buf[0..avail_len].copy_from_slice(__input);
11981            Bytes::new(&payload_buf)
11982        } else {
11983            Bytes::new(__input)
11984        };
11985        let mut __struct = Self::default();
11986        __struct.timestamp = buf.get_u64_le()?;
11987        __struct.custom_state = buf.get_u64_le()?;
11988        __struct.lat = buf.get_i32_le()?;
11989        __struct.lon = buf.get_i32_le()?;
11990        __struct.alt = buf.get_f32_le()?;
11991        for v in &mut __struct.vel {
11992            let val = buf.get_f32_le()?;
11993            *v = val;
11994        }
11995        for v in &mut __struct.acc {
11996            let val = buf.get_f32_le()?;
11997            *v = val;
11998        }
11999        for v in &mut __struct.attitude_q {
12000            let val = buf.get_f32_le()?;
12001            *v = val;
12002        }
12003        for v in &mut __struct.rates {
12004            let val = buf.get_f32_le()?;
12005            *v = val;
12006        }
12007        for v in &mut __struct.position_cov {
12008            let val = buf.get_f32_le()?;
12009            *v = val;
12010        }
12011        __struct.est_capabilities = buf.get_u8()?;
12012        Ok(__struct)
12013    }
12014    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12015        let mut __tmp = BytesMut::new(bytes);
12016        #[allow(clippy::absurd_extreme_comparisons)]
12017        #[allow(unused_comparisons)]
12018        if __tmp.remaining() < Self::ENCODED_LEN {
12019            panic!(
12020                "buffer is too small (need {} bytes, but got {})",
12021                Self::ENCODED_LEN,
12022                __tmp.remaining(),
12023            )
12024        }
12025        __tmp.put_u64_le(self.timestamp);
12026        __tmp.put_u64_le(self.custom_state);
12027        __tmp.put_i32_le(self.lat);
12028        __tmp.put_i32_le(self.lon);
12029        __tmp.put_f32_le(self.alt);
12030        for val in &self.vel {
12031            __tmp.put_f32_le(*val);
12032        }
12033        for val in &self.acc {
12034            __tmp.put_f32_le(*val);
12035        }
12036        for val in &self.attitude_q {
12037            __tmp.put_f32_le(*val);
12038        }
12039        for val in &self.rates {
12040            __tmp.put_f32_le(*val);
12041        }
12042        for val in &self.position_cov {
12043            __tmp.put_f32_le(*val);
12044        }
12045        __tmp.put_u8(self.est_capabilities);
12046        if matches!(version, MavlinkVersion::V2) {
12047            let len = __tmp.len();
12048            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12049        } else {
12050            __tmp.len()
12051        }
12052    }
12053}
12054#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12055#[doc = ""]
12056#[doc = "ID: 371"]
12057#[derive(Debug, Clone, PartialEq)]
12058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12060#[cfg_attr(feature = "ts", derive(TS))]
12061#[cfg_attr(feature = "ts", ts(export))]
12062pub struct FUEL_STATUS_DATA {
12063    #[doc = "Capacity when full. Must be provided."]
12064    pub maximum_fuel: f32,
12065    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12066    pub consumed_fuel: f32,
12067    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12068    pub remaining_fuel: f32,
12069    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12070    pub flow_rate: f32,
12071    #[doc = "Fuel temperature. NaN: field not provided."]
12072    pub temperature: f32,
12073    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12074    pub fuel_type: MavFuelType,
12075    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12076    pub id: u8,
12077    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12078    pub percent_remaining: u8,
12079}
12080impl FUEL_STATUS_DATA {
12081    pub const ENCODED_LEN: usize = 26usize;
12082    pub const DEFAULT: Self = Self {
12083        maximum_fuel: 0.0_f32,
12084        consumed_fuel: 0.0_f32,
12085        remaining_fuel: 0.0_f32,
12086        flow_rate: 0.0_f32,
12087        temperature: 0.0_f32,
12088        fuel_type: MavFuelType::DEFAULT,
12089        id: 0_u8,
12090        percent_remaining: 0_u8,
12091    };
12092    #[cfg(feature = "arbitrary")]
12093    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12094        use arbitrary::{Arbitrary, Unstructured};
12095        let mut buf = [0u8; 1024];
12096        rng.fill_bytes(&mut buf);
12097        let mut unstructured = Unstructured::new(&buf);
12098        Self::arbitrary(&mut unstructured).unwrap_or_default()
12099    }
12100}
12101impl Default for FUEL_STATUS_DATA {
12102    fn default() -> Self {
12103        Self::DEFAULT.clone()
12104    }
12105}
12106impl MessageData for FUEL_STATUS_DATA {
12107    type Message = MavMessage;
12108    const ID: u32 = 371u32;
12109    const NAME: &'static str = "FUEL_STATUS";
12110    const EXTRA_CRC: u8 = 10u8;
12111    const ENCODED_LEN: usize = 26usize;
12112    fn deser(
12113        _version: MavlinkVersion,
12114        __input: &[u8],
12115    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12116        let avail_len = __input.len();
12117        let mut payload_buf = [0; Self::ENCODED_LEN];
12118        let mut buf = if avail_len < Self::ENCODED_LEN {
12119            payload_buf[0..avail_len].copy_from_slice(__input);
12120            Bytes::new(&payload_buf)
12121        } else {
12122            Bytes::new(__input)
12123        };
12124        let mut __struct = Self::default();
12125        __struct.maximum_fuel = buf.get_f32_le()?;
12126        __struct.consumed_fuel = buf.get_f32_le()?;
12127        __struct.remaining_fuel = buf.get_f32_le()?;
12128        __struct.flow_rate = buf.get_f32_le()?;
12129        __struct.temperature = buf.get_f32_le()?;
12130        let tmp = buf.get_u32_le()?;
12131        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12132            ::mavlink_core::error::ParserError::InvalidEnum {
12133                enum_type: "MavFuelType",
12134                value: tmp as u64,
12135            },
12136        )?;
12137        __struct.id = buf.get_u8()?;
12138        __struct.percent_remaining = buf.get_u8()?;
12139        Ok(__struct)
12140    }
12141    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12142        let mut __tmp = BytesMut::new(bytes);
12143        #[allow(clippy::absurd_extreme_comparisons)]
12144        #[allow(unused_comparisons)]
12145        if __tmp.remaining() < Self::ENCODED_LEN {
12146            panic!(
12147                "buffer is too small (need {} bytes, but got {})",
12148                Self::ENCODED_LEN,
12149                __tmp.remaining(),
12150            )
12151        }
12152        __tmp.put_f32_le(self.maximum_fuel);
12153        __tmp.put_f32_le(self.consumed_fuel);
12154        __tmp.put_f32_le(self.remaining_fuel);
12155        __tmp.put_f32_le(self.flow_rate);
12156        __tmp.put_f32_le(self.temperature);
12157        __tmp.put_u32_le(self.fuel_type as u32);
12158        __tmp.put_u8(self.id);
12159        __tmp.put_u8(self.percent_remaining);
12160        if matches!(version, MavlinkVersion::V2) {
12161            let len = __tmp.len();
12162            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12163        } else {
12164            __tmp.len()
12165        }
12166    }
12167}
12168#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12169#[doc = ""]
12170#[doc = "ID: 373"]
12171#[derive(Debug, Clone, PartialEq)]
12172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12174#[cfg_attr(feature = "ts", derive(TS))]
12175#[cfg_attr(feature = "ts", ts(export))]
12176pub struct GENERATOR_STATUS_DATA {
12177    #[doc = "Status flags."]
12178    pub status: MavGeneratorStatusFlag,
12179    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12180    pub battery_current: f32,
12181    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12182    pub load_current: f32,
12183    #[doc = "The power being generated. NaN: field not provided"]
12184    pub power_generated: f32,
12185    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12186    pub bus_voltage: f32,
12187    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12188    pub bat_current_setpoint: f32,
12189    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12190    pub runtime: u32,
12191    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12192    pub time_until_maintenance: i32,
12193    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12194    pub generator_speed: u16,
12195    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12196    pub rectifier_temperature: i16,
12197    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12198    pub generator_temperature: i16,
12199}
12200impl GENERATOR_STATUS_DATA {
12201    pub const ENCODED_LEN: usize = 42usize;
12202    pub const DEFAULT: Self = Self {
12203        status: MavGeneratorStatusFlag::DEFAULT,
12204        battery_current: 0.0_f32,
12205        load_current: 0.0_f32,
12206        power_generated: 0.0_f32,
12207        bus_voltage: 0.0_f32,
12208        bat_current_setpoint: 0.0_f32,
12209        runtime: 0_u32,
12210        time_until_maintenance: 0_i32,
12211        generator_speed: 0_u16,
12212        rectifier_temperature: 0_i16,
12213        generator_temperature: 0_i16,
12214    };
12215    #[cfg(feature = "arbitrary")]
12216    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12217        use arbitrary::{Arbitrary, Unstructured};
12218        let mut buf = [0u8; 1024];
12219        rng.fill_bytes(&mut buf);
12220        let mut unstructured = Unstructured::new(&buf);
12221        Self::arbitrary(&mut unstructured).unwrap_or_default()
12222    }
12223}
12224impl Default for GENERATOR_STATUS_DATA {
12225    fn default() -> Self {
12226        Self::DEFAULT.clone()
12227    }
12228}
12229impl MessageData for GENERATOR_STATUS_DATA {
12230    type Message = MavMessage;
12231    const ID: u32 = 373u32;
12232    const NAME: &'static str = "GENERATOR_STATUS";
12233    const EXTRA_CRC: u8 = 117u8;
12234    const ENCODED_LEN: usize = 42usize;
12235    fn deser(
12236        _version: MavlinkVersion,
12237        __input: &[u8],
12238    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12239        let avail_len = __input.len();
12240        let mut payload_buf = [0; Self::ENCODED_LEN];
12241        let mut buf = if avail_len < Self::ENCODED_LEN {
12242            payload_buf[0..avail_len].copy_from_slice(__input);
12243            Bytes::new(&payload_buf)
12244        } else {
12245            Bytes::new(__input)
12246        };
12247        let mut __struct = Self::default();
12248        let tmp = buf.get_u64_le()?;
12249        __struct.status =
12250            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
12251                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12252                    flag_type: "MavGeneratorStatusFlag",
12253                    value: tmp as u64,
12254                })?;
12255        __struct.battery_current = buf.get_f32_le()?;
12256        __struct.load_current = buf.get_f32_le()?;
12257        __struct.power_generated = buf.get_f32_le()?;
12258        __struct.bus_voltage = buf.get_f32_le()?;
12259        __struct.bat_current_setpoint = buf.get_f32_le()?;
12260        __struct.runtime = buf.get_u32_le()?;
12261        __struct.time_until_maintenance = buf.get_i32_le()?;
12262        __struct.generator_speed = buf.get_u16_le()?;
12263        __struct.rectifier_temperature = buf.get_i16_le()?;
12264        __struct.generator_temperature = buf.get_i16_le()?;
12265        Ok(__struct)
12266    }
12267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12268        let mut __tmp = BytesMut::new(bytes);
12269        #[allow(clippy::absurd_extreme_comparisons)]
12270        #[allow(unused_comparisons)]
12271        if __tmp.remaining() < Self::ENCODED_LEN {
12272            panic!(
12273                "buffer is too small (need {} bytes, but got {})",
12274                Self::ENCODED_LEN,
12275                __tmp.remaining(),
12276            )
12277        }
12278        __tmp.put_u64_le(self.status.bits() as u64);
12279        __tmp.put_f32_le(self.battery_current);
12280        __tmp.put_f32_le(self.load_current);
12281        __tmp.put_f32_le(self.power_generated);
12282        __tmp.put_f32_le(self.bus_voltage);
12283        __tmp.put_f32_le(self.bat_current_setpoint);
12284        __tmp.put_u32_le(self.runtime);
12285        __tmp.put_i32_le(self.time_until_maintenance);
12286        __tmp.put_u16_le(self.generator_speed);
12287        __tmp.put_i16_le(self.rectifier_temperature);
12288        __tmp.put_i16_le(self.generator_temperature);
12289        if matches!(version, MavlinkVersion::V2) {
12290            let len = __tmp.len();
12291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12292        } else {
12293            __tmp.len()
12294        }
12295    }
12296}
12297#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12298#[doc = ""]
12299#[doc = "ID: 285"]
12300#[derive(Debug, Clone, PartialEq)]
12301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12303#[cfg_attr(feature = "ts", derive(TS))]
12304#[cfg_attr(feature = "ts", ts(export))]
12305pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12306    #[doc = "Timestamp (time since system boot)."]
12307    pub time_boot_ms: u32,
12308    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12309    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12310    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12311    pub q: [f32; 4],
12312    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12313    pub angular_velocity_x: f32,
12314    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12315    pub angular_velocity_y: f32,
12316    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12317    pub angular_velocity_z: f32,
12318    #[doc = "Failure flags (0 for no failure)"]
12319    pub failure_flags: GimbalDeviceErrorFlags,
12320    #[doc = "Current gimbal flags set."]
12321    pub flags: GimbalDeviceFlags,
12322    #[doc = "System ID"]
12323    pub target_system: u8,
12324    #[doc = "Component ID"]
12325    pub target_component: u8,
12326    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12327    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12328    pub delta_yaw: f32,
12329    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12330    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12331    pub delta_yaw_velocity: f32,
12332    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12333    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12334    pub gimbal_device_id: u8,
12335}
12336impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12337    pub const ENCODED_LEN: usize = 49usize;
12338    pub const DEFAULT: Self = Self {
12339        time_boot_ms: 0_u32,
12340        q: [0.0_f32; 4usize],
12341        angular_velocity_x: 0.0_f32,
12342        angular_velocity_y: 0.0_f32,
12343        angular_velocity_z: 0.0_f32,
12344        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12345        flags: GimbalDeviceFlags::DEFAULT,
12346        target_system: 0_u8,
12347        target_component: 0_u8,
12348        delta_yaw: 0.0_f32,
12349        delta_yaw_velocity: 0.0_f32,
12350        gimbal_device_id: 0_u8,
12351    };
12352    #[cfg(feature = "arbitrary")]
12353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12354        use arbitrary::{Arbitrary, Unstructured};
12355        let mut buf = [0u8; 1024];
12356        rng.fill_bytes(&mut buf);
12357        let mut unstructured = Unstructured::new(&buf);
12358        Self::arbitrary(&mut unstructured).unwrap_or_default()
12359    }
12360}
12361impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12362    fn default() -> Self {
12363        Self::DEFAULT.clone()
12364    }
12365}
12366impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12367    type Message = MavMessage;
12368    const ID: u32 = 285u32;
12369    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12370    const EXTRA_CRC: u8 = 137u8;
12371    const ENCODED_LEN: usize = 49usize;
12372    fn deser(
12373        _version: MavlinkVersion,
12374        __input: &[u8],
12375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12376        let avail_len = __input.len();
12377        let mut payload_buf = [0; Self::ENCODED_LEN];
12378        let mut buf = if avail_len < Self::ENCODED_LEN {
12379            payload_buf[0..avail_len].copy_from_slice(__input);
12380            Bytes::new(&payload_buf)
12381        } else {
12382            Bytes::new(__input)
12383        };
12384        let mut __struct = Self::default();
12385        __struct.time_boot_ms = buf.get_u32_le()?;
12386        for v in &mut __struct.q {
12387            let val = buf.get_f32_le()?;
12388            *v = val;
12389        }
12390        __struct.angular_velocity_x = buf.get_f32_le()?;
12391        __struct.angular_velocity_y = buf.get_f32_le()?;
12392        __struct.angular_velocity_z = buf.get_f32_le()?;
12393        let tmp = buf.get_u32_le()?;
12394        __struct.failure_flags =
12395            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
12396                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12397                    flag_type: "GimbalDeviceErrorFlags",
12398                    value: tmp as u64,
12399                })?;
12400        let tmp = buf.get_u16_le()?;
12401        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12402            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12403                flag_type: "GimbalDeviceFlags",
12404                value: tmp as u64,
12405            })?;
12406        __struct.target_system = buf.get_u8()?;
12407        __struct.target_component = buf.get_u8()?;
12408        __struct.delta_yaw = buf.get_f32_le()?;
12409        __struct.delta_yaw_velocity = buf.get_f32_le()?;
12410        __struct.gimbal_device_id = buf.get_u8()?;
12411        Ok(__struct)
12412    }
12413    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12414        let mut __tmp = BytesMut::new(bytes);
12415        #[allow(clippy::absurd_extreme_comparisons)]
12416        #[allow(unused_comparisons)]
12417        if __tmp.remaining() < Self::ENCODED_LEN {
12418            panic!(
12419                "buffer is too small (need {} bytes, but got {})",
12420                Self::ENCODED_LEN,
12421                __tmp.remaining(),
12422            )
12423        }
12424        __tmp.put_u32_le(self.time_boot_ms);
12425        for val in &self.q {
12426            __tmp.put_f32_le(*val);
12427        }
12428        __tmp.put_f32_le(self.angular_velocity_x);
12429        __tmp.put_f32_le(self.angular_velocity_y);
12430        __tmp.put_f32_le(self.angular_velocity_z);
12431        __tmp.put_u32_le(self.failure_flags.bits() as u32);
12432        __tmp.put_u16_le(self.flags.bits() as u16);
12433        __tmp.put_u8(self.target_system);
12434        __tmp.put_u8(self.target_component);
12435        if matches!(version, MavlinkVersion::V2) {
12436            __tmp.put_f32_le(self.delta_yaw);
12437            __tmp.put_f32_le(self.delta_yaw_velocity);
12438            __tmp.put_u8(self.gimbal_device_id);
12439            let len = __tmp.len();
12440            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12441        } else {
12442            __tmp.len()
12443        }
12444    }
12445}
12446#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12447#[doc = ""]
12448#[doc = "ID: 283"]
12449#[derive(Debug, Clone, PartialEq)]
12450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12452#[cfg_attr(feature = "ts", derive(TS))]
12453#[cfg_attr(feature = "ts", ts(export))]
12454pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12455    #[doc = "UID of gimbal hardware (0 if unknown)."]
12456    pub uid: u64,
12457    #[doc = "Timestamp (time since system boot)."]
12458    pub time_boot_ms: u32,
12459    #[doc = "0xff)."]
12460    pub firmware_version: u32,
12461    #[doc = "0xff)."]
12462    pub hardware_version: u32,
12463    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12464    pub roll_min: f32,
12465    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12466    pub roll_max: f32,
12467    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12468    pub pitch_min: f32,
12469    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12470    pub pitch_max: f32,
12471    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12472    pub yaw_min: f32,
12473    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12474    pub yaw_max: f32,
12475    #[doc = "Bitmap of gimbal capability flags."]
12476    pub cap_flags: GimbalDeviceCapFlags,
12477    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12478    pub custom_cap_flags: u16,
12479    #[doc = "Name of the gimbal vendor."]
12480    #[cfg_attr(feature = "ts", ts(type = "string"))]
12481    pub vendor_name: CharArray<32>,
12482    #[doc = "Name of the gimbal model."]
12483    #[cfg_attr(feature = "ts", ts(type = "string"))]
12484    pub model_name: CharArray<32>,
12485    #[doc = "Custom name of the gimbal given to it by the user."]
12486    #[cfg_attr(feature = "ts", ts(type = "string"))]
12487    pub custom_name: CharArray<32>,
12488    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12489    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12490    pub gimbal_device_id: u8,
12491}
12492impl GIMBAL_DEVICE_INFORMATION_DATA {
12493    pub const ENCODED_LEN: usize = 145usize;
12494    pub const DEFAULT: Self = Self {
12495        uid: 0_u64,
12496        time_boot_ms: 0_u32,
12497        firmware_version: 0_u32,
12498        hardware_version: 0_u32,
12499        roll_min: 0.0_f32,
12500        roll_max: 0.0_f32,
12501        pitch_min: 0.0_f32,
12502        pitch_max: 0.0_f32,
12503        yaw_min: 0.0_f32,
12504        yaw_max: 0.0_f32,
12505        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12506        custom_cap_flags: 0_u16,
12507        vendor_name: CharArray::new([0_u8; 32usize]),
12508        model_name: CharArray::new([0_u8; 32usize]),
12509        custom_name: CharArray::new([0_u8; 32usize]),
12510        gimbal_device_id: 0_u8,
12511    };
12512    #[cfg(feature = "arbitrary")]
12513    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12514        use arbitrary::{Arbitrary, Unstructured};
12515        let mut buf = [0u8; 1024];
12516        rng.fill_bytes(&mut buf);
12517        let mut unstructured = Unstructured::new(&buf);
12518        Self::arbitrary(&mut unstructured).unwrap_or_default()
12519    }
12520}
12521impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12522    fn default() -> Self {
12523        Self::DEFAULT.clone()
12524    }
12525}
12526impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12527    type Message = MavMessage;
12528    const ID: u32 = 283u32;
12529    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12530    const EXTRA_CRC: u8 = 74u8;
12531    const ENCODED_LEN: usize = 145usize;
12532    fn deser(
12533        _version: MavlinkVersion,
12534        __input: &[u8],
12535    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12536        let avail_len = __input.len();
12537        let mut payload_buf = [0; Self::ENCODED_LEN];
12538        let mut buf = if avail_len < Self::ENCODED_LEN {
12539            payload_buf[0..avail_len].copy_from_slice(__input);
12540            Bytes::new(&payload_buf)
12541        } else {
12542            Bytes::new(__input)
12543        };
12544        let mut __struct = Self::default();
12545        __struct.uid = buf.get_u64_le()?;
12546        __struct.time_boot_ms = buf.get_u32_le()?;
12547        __struct.firmware_version = buf.get_u32_le()?;
12548        __struct.hardware_version = buf.get_u32_le()?;
12549        __struct.roll_min = buf.get_f32_le()?;
12550        __struct.roll_max = buf.get_f32_le()?;
12551        __struct.pitch_min = buf.get_f32_le()?;
12552        __struct.pitch_max = buf.get_f32_le()?;
12553        __struct.yaw_min = buf.get_f32_le()?;
12554        __struct.yaw_max = buf.get_f32_le()?;
12555        let tmp = buf.get_u16_le()?;
12556        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12557            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
12558        )
12559        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12560            flag_type: "GimbalDeviceCapFlags",
12561            value: tmp as u64,
12562        })?;
12563        __struct.custom_cap_flags = buf.get_u16_le()?;
12564        let mut tmp = [0_u8; 32usize];
12565        for v in &mut tmp {
12566            *v = buf.get_u8()?;
12567        }
12568        __struct.vendor_name = CharArray::new(tmp);
12569        let mut tmp = [0_u8; 32usize];
12570        for v in &mut tmp {
12571            *v = buf.get_u8()?;
12572        }
12573        __struct.model_name = CharArray::new(tmp);
12574        let mut tmp = [0_u8; 32usize];
12575        for v in &mut tmp {
12576            *v = buf.get_u8()?;
12577        }
12578        __struct.custom_name = CharArray::new(tmp);
12579        __struct.gimbal_device_id = buf.get_u8()?;
12580        Ok(__struct)
12581    }
12582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12583        let mut __tmp = BytesMut::new(bytes);
12584        #[allow(clippy::absurd_extreme_comparisons)]
12585        #[allow(unused_comparisons)]
12586        if __tmp.remaining() < Self::ENCODED_LEN {
12587            panic!(
12588                "buffer is too small (need {} bytes, but got {})",
12589                Self::ENCODED_LEN,
12590                __tmp.remaining(),
12591            )
12592        }
12593        __tmp.put_u64_le(self.uid);
12594        __tmp.put_u32_le(self.time_boot_ms);
12595        __tmp.put_u32_le(self.firmware_version);
12596        __tmp.put_u32_le(self.hardware_version);
12597        __tmp.put_f32_le(self.roll_min);
12598        __tmp.put_f32_le(self.roll_max);
12599        __tmp.put_f32_le(self.pitch_min);
12600        __tmp.put_f32_le(self.pitch_max);
12601        __tmp.put_f32_le(self.yaw_min);
12602        __tmp.put_f32_le(self.yaw_max);
12603        __tmp.put_u16_le(self.cap_flags.bits() as u16);
12604        __tmp.put_u16_le(self.custom_cap_flags);
12605        for val in &self.vendor_name {
12606            __tmp.put_u8(*val);
12607        }
12608        for val in &self.model_name {
12609            __tmp.put_u8(*val);
12610        }
12611        for val in &self.custom_name {
12612            __tmp.put_u8(*val);
12613        }
12614        if matches!(version, MavlinkVersion::V2) {
12615            __tmp.put_u8(self.gimbal_device_id);
12616            let len = __tmp.len();
12617            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12618        } else {
12619            __tmp.len()
12620        }
12621    }
12622}
12623#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12624#[doc = ""]
12625#[doc = "ID: 284"]
12626#[derive(Debug, Clone, PartialEq)]
12627#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12629#[cfg_attr(feature = "ts", derive(TS))]
12630#[cfg_attr(feature = "ts", ts(export))]
12631pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12632    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12633    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12634    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12635    pub q: [f32; 4],
12636    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12637    pub angular_velocity_x: f32,
12638    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12639    pub angular_velocity_y: f32,
12640    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12641    pub angular_velocity_z: f32,
12642    #[doc = "Low level gimbal flags."]
12643    pub flags: GimbalDeviceFlags,
12644    #[doc = "System ID"]
12645    pub target_system: u8,
12646    #[doc = "Component ID"]
12647    pub target_component: u8,
12648}
12649impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12650    pub const ENCODED_LEN: usize = 32usize;
12651    pub const DEFAULT: Self = Self {
12652        q: [0.0_f32; 4usize],
12653        angular_velocity_x: 0.0_f32,
12654        angular_velocity_y: 0.0_f32,
12655        angular_velocity_z: 0.0_f32,
12656        flags: GimbalDeviceFlags::DEFAULT,
12657        target_system: 0_u8,
12658        target_component: 0_u8,
12659    };
12660    #[cfg(feature = "arbitrary")]
12661    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12662        use arbitrary::{Arbitrary, Unstructured};
12663        let mut buf = [0u8; 1024];
12664        rng.fill_bytes(&mut buf);
12665        let mut unstructured = Unstructured::new(&buf);
12666        Self::arbitrary(&mut unstructured).unwrap_or_default()
12667    }
12668}
12669impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12670    fn default() -> Self {
12671        Self::DEFAULT.clone()
12672    }
12673}
12674impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12675    type Message = MavMessage;
12676    const ID: u32 = 284u32;
12677    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12678    const EXTRA_CRC: u8 = 99u8;
12679    const ENCODED_LEN: usize = 32usize;
12680    fn deser(
12681        _version: MavlinkVersion,
12682        __input: &[u8],
12683    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12684        let avail_len = __input.len();
12685        let mut payload_buf = [0; Self::ENCODED_LEN];
12686        let mut buf = if avail_len < Self::ENCODED_LEN {
12687            payload_buf[0..avail_len].copy_from_slice(__input);
12688            Bytes::new(&payload_buf)
12689        } else {
12690            Bytes::new(__input)
12691        };
12692        let mut __struct = Self::default();
12693        for v in &mut __struct.q {
12694            let val = buf.get_f32_le()?;
12695            *v = val;
12696        }
12697        __struct.angular_velocity_x = buf.get_f32_le()?;
12698        __struct.angular_velocity_y = buf.get_f32_le()?;
12699        __struct.angular_velocity_z = buf.get_f32_le()?;
12700        let tmp = buf.get_u16_le()?;
12701        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12702            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12703                flag_type: "GimbalDeviceFlags",
12704                value: tmp as u64,
12705            })?;
12706        __struct.target_system = buf.get_u8()?;
12707        __struct.target_component = buf.get_u8()?;
12708        Ok(__struct)
12709    }
12710    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12711        let mut __tmp = BytesMut::new(bytes);
12712        #[allow(clippy::absurd_extreme_comparisons)]
12713        #[allow(unused_comparisons)]
12714        if __tmp.remaining() < Self::ENCODED_LEN {
12715            panic!(
12716                "buffer is too small (need {} bytes, but got {})",
12717                Self::ENCODED_LEN,
12718                __tmp.remaining(),
12719            )
12720        }
12721        for val in &self.q {
12722            __tmp.put_f32_le(*val);
12723        }
12724        __tmp.put_f32_le(self.angular_velocity_x);
12725        __tmp.put_f32_le(self.angular_velocity_y);
12726        __tmp.put_f32_le(self.angular_velocity_z);
12727        __tmp.put_u16_le(self.flags.bits() as u16);
12728        __tmp.put_u8(self.target_system);
12729        __tmp.put_u8(self.target_component);
12730        if matches!(version, MavlinkVersion::V2) {
12731            let len = __tmp.len();
12732            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12733        } else {
12734            __tmp.len()
12735        }
12736    }
12737}
12738#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12739#[doc = ""]
12740#[doc = "ID: 280"]
12741#[derive(Debug, Clone, PartialEq)]
12742#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12743#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12744#[cfg_attr(feature = "ts", derive(TS))]
12745#[cfg_attr(feature = "ts", ts(export))]
12746pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12747    #[doc = "Timestamp (time since system boot)."]
12748    pub time_boot_ms: u32,
12749    #[doc = "Bitmap of gimbal capability flags."]
12750    pub cap_flags: GimbalManagerCapFlags,
12751    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12752    pub roll_min: f32,
12753    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12754    pub roll_max: f32,
12755    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12756    pub pitch_min: f32,
12757    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12758    pub pitch_max: f32,
12759    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12760    pub yaw_min: f32,
12761    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12762    pub yaw_max: f32,
12763    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12764    pub gimbal_device_id: u8,
12765}
12766impl GIMBAL_MANAGER_INFORMATION_DATA {
12767    pub const ENCODED_LEN: usize = 33usize;
12768    pub const DEFAULT: Self = Self {
12769        time_boot_ms: 0_u32,
12770        cap_flags: GimbalManagerCapFlags::DEFAULT,
12771        roll_min: 0.0_f32,
12772        roll_max: 0.0_f32,
12773        pitch_min: 0.0_f32,
12774        pitch_max: 0.0_f32,
12775        yaw_min: 0.0_f32,
12776        yaw_max: 0.0_f32,
12777        gimbal_device_id: 0_u8,
12778    };
12779    #[cfg(feature = "arbitrary")]
12780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12781        use arbitrary::{Arbitrary, Unstructured};
12782        let mut buf = [0u8; 1024];
12783        rng.fill_bytes(&mut buf);
12784        let mut unstructured = Unstructured::new(&buf);
12785        Self::arbitrary(&mut unstructured).unwrap_or_default()
12786    }
12787}
12788impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12789    fn default() -> Self {
12790        Self::DEFAULT.clone()
12791    }
12792}
12793impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12794    type Message = MavMessage;
12795    const ID: u32 = 280u32;
12796    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12797    const EXTRA_CRC: u8 = 70u8;
12798    const ENCODED_LEN: usize = 33usize;
12799    fn deser(
12800        _version: MavlinkVersion,
12801        __input: &[u8],
12802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12803        let avail_len = __input.len();
12804        let mut payload_buf = [0; Self::ENCODED_LEN];
12805        let mut buf = if avail_len < Self::ENCODED_LEN {
12806            payload_buf[0..avail_len].copy_from_slice(__input);
12807            Bytes::new(&payload_buf)
12808        } else {
12809            Bytes::new(__input)
12810        };
12811        let mut __struct = Self::default();
12812        __struct.time_boot_ms = buf.get_u32_le()?;
12813        let tmp = buf.get_u32_le()?;
12814        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12815            tmp as <GimbalManagerCapFlags as Flags>::Bits,
12816        )
12817        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12818            flag_type: "GimbalManagerCapFlags",
12819            value: tmp as u64,
12820        })?;
12821        __struct.roll_min = buf.get_f32_le()?;
12822        __struct.roll_max = buf.get_f32_le()?;
12823        __struct.pitch_min = buf.get_f32_le()?;
12824        __struct.pitch_max = buf.get_f32_le()?;
12825        __struct.yaw_min = buf.get_f32_le()?;
12826        __struct.yaw_max = buf.get_f32_le()?;
12827        __struct.gimbal_device_id = buf.get_u8()?;
12828        Ok(__struct)
12829    }
12830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12831        let mut __tmp = BytesMut::new(bytes);
12832        #[allow(clippy::absurd_extreme_comparisons)]
12833        #[allow(unused_comparisons)]
12834        if __tmp.remaining() < Self::ENCODED_LEN {
12835            panic!(
12836                "buffer is too small (need {} bytes, but got {})",
12837                Self::ENCODED_LEN,
12838                __tmp.remaining(),
12839            )
12840        }
12841        __tmp.put_u32_le(self.time_boot_ms);
12842        __tmp.put_u32_le(self.cap_flags.bits() as u32);
12843        __tmp.put_f32_le(self.roll_min);
12844        __tmp.put_f32_le(self.roll_max);
12845        __tmp.put_f32_le(self.pitch_min);
12846        __tmp.put_f32_le(self.pitch_max);
12847        __tmp.put_f32_le(self.yaw_min);
12848        __tmp.put_f32_le(self.yaw_max);
12849        __tmp.put_u8(self.gimbal_device_id);
12850        if matches!(version, MavlinkVersion::V2) {
12851            let len = __tmp.len();
12852            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12853        } else {
12854            __tmp.len()
12855        }
12856    }
12857}
12858#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12859#[doc = ""]
12860#[doc = "ID: 282"]
12861#[derive(Debug, Clone, PartialEq)]
12862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12864#[cfg_attr(feature = "ts", derive(TS))]
12865#[cfg_attr(feature = "ts", ts(export))]
12866pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12867    #[doc = "High level gimbal manager flags to use."]
12868    pub flags: GimbalManagerFlags,
12869    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12870    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12871    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12872    pub q: [f32; 4],
12873    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12874    pub angular_velocity_x: f32,
12875    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12876    pub angular_velocity_y: f32,
12877    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12878    pub angular_velocity_z: f32,
12879    #[doc = "System ID"]
12880    pub target_system: u8,
12881    #[doc = "Component ID"]
12882    pub target_component: u8,
12883    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12884    pub gimbal_device_id: u8,
12885}
12886impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12887    pub const ENCODED_LEN: usize = 35usize;
12888    pub const DEFAULT: Self = Self {
12889        flags: GimbalManagerFlags::DEFAULT,
12890        q: [0.0_f32; 4usize],
12891        angular_velocity_x: 0.0_f32,
12892        angular_velocity_y: 0.0_f32,
12893        angular_velocity_z: 0.0_f32,
12894        target_system: 0_u8,
12895        target_component: 0_u8,
12896        gimbal_device_id: 0_u8,
12897    };
12898    #[cfg(feature = "arbitrary")]
12899    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12900        use arbitrary::{Arbitrary, Unstructured};
12901        let mut buf = [0u8; 1024];
12902        rng.fill_bytes(&mut buf);
12903        let mut unstructured = Unstructured::new(&buf);
12904        Self::arbitrary(&mut unstructured).unwrap_or_default()
12905    }
12906}
12907impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12908    fn default() -> Self {
12909        Self::DEFAULT.clone()
12910    }
12911}
12912impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12913    type Message = MavMessage;
12914    const ID: u32 = 282u32;
12915    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12916    const EXTRA_CRC: u8 = 123u8;
12917    const ENCODED_LEN: usize = 35usize;
12918    fn deser(
12919        _version: MavlinkVersion,
12920        __input: &[u8],
12921    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12922        let avail_len = __input.len();
12923        let mut payload_buf = [0; Self::ENCODED_LEN];
12924        let mut buf = if avail_len < Self::ENCODED_LEN {
12925            payload_buf[0..avail_len].copy_from_slice(__input);
12926            Bytes::new(&payload_buf)
12927        } else {
12928            Bytes::new(__input)
12929        };
12930        let mut __struct = Self::default();
12931        let tmp = buf.get_u32_le()?;
12932        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
12933            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12934                flag_type: "GimbalManagerFlags",
12935                value: tmp as u64,
12936            })?;
12937        for v in &mut __struct.q {
12938            let val = buf.get_f32_le()?;
12939            *v = val;
12940        }
12941        __struct.angular_velocity_x = buf.get_f32_le()?;
12942        __struct.angular_velocity_y = buf.get_f32_le()?;
12943        __struct.angular_velocity_z = buf.get_f32_le()?;
12944        __struct.target_system = buf.get_u8()?;
12945        __struct.target_component = buf.get_u8()?;
12946        __struct.gimbal_device_id = buf.get_u8()?;
12947        Ok(__struct)
12948    }
12949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12950        let mut __tmp = BytesMut::new(bytes);
12951        #[allow(clippy::absurd_extreme_comparisons)]
12952        #[allow(unused_comparisons)]
12953        if __tmp.remaining() < Self::ENCODED_LEN {
12954            panic!(
12955                "buffer is too small (need {} bytes, but got {})",
12956                Self::ENCODED_LEN,
12957                __tmp.remaining(),
12958            )
12959        }
12960        __tmp.put_u32_le(self.flags.bits() as u32);
12961        for val in &self.q {
12962            __tmp.put_f32_le(*val);
12963        }
12964        __tmp.put_f32_le(self.angular_velocity_x);
12965        __tmp.put_f32_le(self.angular_velocity_y);
12966        __tmp.put_f32_le(self.angular_velocity_z);
12967        __tmp.put_u8(self.target_system);
12968        __tmp.put_u8(self.target_component);
12969        __tmp.put_u8(self.gimbal_device_id);
12970        if matches!(version, MavlinkVersion::V2) {
12971            let len = __tmp.len();
12972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12973        } else {
12974            __tmp.len()
12975        }
12976    }
12977}
12978#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12979#[doc = ""]
12980#[doc = "ID: 288"]
12981#[derive(Debug, Clone, PartialEq)]
12982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12984#[cfg_attr(feature = "ts", derive(TS))]
12985#[cfg_attr(feature = "ts", ts(export))]
12986pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12987    #[doc = "High level gimbal manager flags."]
12988    pub flags: GimbalManagerFlags,
12989    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12990    pub pitch: f32,
12991    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12992    pub yaw: f32,
12993    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12994    pub pitch_rate: f32,
12995    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12996    pub yaw_rate: f32,
12997    #[doc = "System ID"]
12998    pub target_system: u8,
12999    #[doc = "Component ID"]
13000    pub target_component: u8,
13001    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13002    pub gimbal_device_id: u8,
13003}
13004impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13005    pub const ENCODED_LEN: usize = 23usize;
13006    pub const DEFAULT: Self = Self {
13007        flags: GimbalManagerFlags::DEFAULT,
13008        pitch: 0.0_f32,
13009        yaw: 0.0_f32,
13010        pitch_rate: 0.0_f32,
13011        yaw_rate: 0.0_f32,
13012        target_system: 0_u8,
13013        target_component: 0_u8,
13014        gimbal_device_id: 0_u8,
13015    };
13016    #[cfg(feature = "arbitrary")]
13017    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13018        use arbitrary::{Arbitrary, Unstructured};
13019        let mut buf = [0u8; 1024];
13020        rng.fill_bytes(&mut buf);
13021        let mut unstructured = Unstructured::new(&buf);
13022        Self::arbitrary(&mut unstructured).unwrap_or_default()
13023    }
13024}
13025impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13026    fn default() -> Self {
13027        Self::DEFAULT.clone()
13028    }
13029}
13030impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13031    type Message = MavMessage;
13032    const ID: u32 = 288u32;
13033    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13034    const EXTRA_CRC: u8 = 20u8;
13035    const ENCODED_LEN: usize = 23usize;
13036    fn deser(
13037        _version: MavlinkVersion,
13038        __input: &[u8],
13039    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13040        let avail_len = __input.len();
13041        let mut payload_buf = [0; Self::ENCODED_LEN];
13042        let mut buf = if avail_len < Self::ENCODED_LEN {
13043            payload_buf[0..avail_len].copy_from_slice(__input);
13044            Bytes::new(&payload_buf)
13045        } else {
13046            Bytes::new(__input)
13047        };
13048        let mut __struct = Self::default();
13049        let tmp = buf.get_u32_le()?;
13050        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13051            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13052                flag_type: "GimbalManagerFlags",
13053                value: tmp as u64,
13054            })?;
13055        __struct.pitch = buf.get_f32_le()?;
13056        __struct.yaw = buf.get_f32_le()?;
13057        __struct.pitch_rate = buf.get_f32_le()?;
13058        __struct.yaw_rate = buf.get_f32_le()?;
13059        __struct.target_system = buf.get_u8()?;
13060        __struct.target_component = buf.get_u8()?;
13061        __struct.gimbal_device_id = buf.get_u8()?;
13062        Ok(__struct)
13063    }
13064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13065        let mut __tmp = BytesMut::new(bytes);
13066        #[allow(clippy::absurd_extreme_comparisons)]
13067        #[allow(unused_comparisons)]
13068        if __tmp.remaining() < Self::ENCODED_LEN {
13069            panic!(
13070                "buffer is too small (need {} bytes, but got {})",
13071                Self::ENCODED_LEN,
13072                __tmp.remaining(),
13073            )
13074        }
13075        __tmp.put_u32_le(self.flags.bits() as u32);
13076        __tmp.put_f32_le(self.pitch);
13077        __tmp.put_f32_le(self.yaw);
13078        __tmp.put_f32_le(self.pitch_rate);
13079        __tmp.put_f32_le(self.yaw_rate);
13080        __tmp.put_u8(self.target_system);
13081        __tmp.put_u8(self.target_component);
13082        __tmp.put_u8(self.gimbal_device_id);
13083        if matches!(version, MavlinkVersion::V2) {
13084            let len = __tmp.len();
13085            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13086        } else {
13087            __tmp.len()
13088        }
13089    }
13090}
13091#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13092#[doc = ""]
13093#[doc = "ID: 287"]
13094#[derive(Debug, Clone, PartialEq)]
13095#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13096#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13097#[cfg_attr(feature = "ts", derive(TS))]
13098#[cfg_attr(feature = "ts", ts(export))]
13099pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13100    #[doc = "High level gimbal manager flags to use."]
13101    pub flags: GimbalManagerFlags,
13102    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13103    pub pitch: f32,
13104    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13105    pub yaw: f32,
13106    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13107    pub pitch_rate: f32,
13108    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13109    pub yaw_rate: f32,
13110    #[doc = "System ID"]
13111    pub target_system: u8,
13112    #[doc = "Component ID"]
13113    pub target_component: u8,
13114    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13115    pub gimbal_device_id: u8,
13116}
13117impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13118    pub const ENCODED_LEN: usize = 23usize;
13119    pub const DEFAULT: Self = Self {
13120        flags: GimbalManagerFlags::DEFAULT,
13121        pitch: 0.0_f32,
13122        yaw: 0.0_f32,
13123        pitch_rate: 0.0_f32,
13124        yaw_rate: 0.0_f32,
13125        target_system: 0_u8,
13126        target_component: 0_u8,
13127        gimbal_device_id: 0_u8,
13128    };
13129    #[cfg(feature = "arbitrary")]
13130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13131        use arbitrary::{Arbitrary, Unstructured};
13132        let mut buf = [0u8; 1024];
13133        rng.fill_bytes(&mut buf);
13134        let mut unstructured = Unstructured::new(&buf);
13135        Self::arbitrary(&mut unstructured).unwrap_or_default()
13136    }
13137}
13138impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13139    fn default() -> Self {
13140        Self::DEFAULT.clone()
13141    }
13142}
13143impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13144    type Message = MavMessage;
13145    const ID: u32 = 287u32;
13146    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13147    const EXTRA_CRC: u8 = 1u8;
13148    const ENCODED_LEN: usize = 23usize;
13149    fn deser(
13150        _version: MavlinkVersion,
13151        __input: &[u8],
13152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13153        let avail_len = __input.len();
13154        let mut payload_buf = [0; Self::ENCODED_LEN];
13155        let mut buf = if avail_len < Self::ENCODED_LEN {
13156            payload_buf[0..avail_len].copy_from_slice(__input);
13157            Bytes::new(&payload_buf)
13158        } else {
13159            Bytes::new(__input)
13160        };
13161        let mut __struct = Self::default();
13162        let tmp = buf.get_u32_le()?;
13163        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13164            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13165                flag_type: "GimbalManagerFlags",
13166                value: tmp as u64,
13167            })?;
13168        __struct.pitch = buf.get_f32_le()?;
13169        __struct.yaw = buf.get_f32_le()?;
13170        __struct.pitch_rate = buf.get_f32_le()?;
13171        __struct.yaw_rate = buf.get_f32_le()?;
13172        __struct.target_system = buf.get_u8()?;
13173        __struct.target_component = buf.get_u8()?;
13174        __struct.gimbal_device_id = buf.get_u8()?;
13175        Ok(__struct)
13176    }
13177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13178        let mut __tmp = BytesMut::new(bytes);
13179        #[allow(clippy::absurd_extreme_comparisons)]
13180        #[allow(unused_comparisons)]
13181        if __tmp.remaining() < Self::ENCODED_LEN {
13182            panic!(
13183                "buffer is too small (need {} bytes, but got {})",
13184                Self::ENCODED_LEN,
13185                __tmp.remaining(),
13186            )
13187        }
13188        __tmp.put_u32_le(self.flags.bits() as u32);
13189        __tmp.put_f32_le(self.pitch);
13190        __tmp.put_f32_le(self.yaw);
13191        __tmp.put_f32_le(self.pitch_rate);
13192        __tmp.put_f32_le(self.yaw_rate);
13193        __tmp.put_u8(self.target_system);
13194        __tmp.put_u8(self.target_component);
13195        __tmp.put_u8(self.gimbal_device_id);
13196        if matches!(version, MavlinkVersion::V2) {
13197            let len = __tmp.len();
13198            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13199        } else {
13200            __tmp.len()
13201        }
13202    }
13203}
13204#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13205#[doc = ""]
13206#[doc = "ID: 281"]
13207#[derive(Debug, Clone, PartialEq)]
13208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13209#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13210#[cfg_attr(feature = "ts", derive(TS))]
13211#[cfg_attr(feature = "ts", ts(export))]
13212pub struct GIMBAL_MANAGER_STATUS_DATA {
13213    #[doc = "Timestamp (time since system boot)."]
13214    pub time_boot_ms: u32,
13215    #[doc = "High level gimbal manager flags currently applied."]
13216    pub flags: GimbalManagerFlags,
13217    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13218    pub gimbal_device_id: u8,
13219    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13220    pub primary_control_sysid: u8,
13221    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13222    pub primary_control_compid: u8,
13223    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13224    pub secondary_control_sysid: u8,
13225    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13226    pub secondary_control_compid: u8,
13227}
13228impl GIMBAL_MANAGER_STATUS_DATA {
13229    pub const ENCODED_LEN: usize = 13usize;
13230    pub const DEFAULT: Self = Self {
13231        time_boot_ms: 0_u32,
13232        flags: GimbalManagerFlags::DEFAULT,
13233        gimbal_device_id: 0_u8,
13234        primary_control_sysid: 0_u8,
13235        primary_control_compid: 0_u8,
13236        secondary_control_sysid: 0_u8,
13237        secondary_control_compid: 0_u8,
13238    };
13239    #[cfg(feature = "arbitrary")]
13240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13241        use arbitrary::{Arbitrary, Unstructured};
13242        let mut buf = [0u8; 1024];
13243        rng.fill_bytes(&mut buf);
13244        let mut unstructured = Unstructured::new(&buf);
13245        Self::arbitrary(&mut unstructured).unwrap_or_default()
13246    }
13247}
13248impl Default for GIMBAL_MANAGER_STATUS_DATA {
13249    fn default() -> Self {
13250        Self::DEFAULT.clone()
13251    }
13252}
13253impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13254    type Message = MavMessage;
13255    const ID: u32 = 281u32;
13256    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13257    const EXTRA_CRC: u8 = 48u8;
13258    const ENCODED_LEN: usize = 13usize;
13259    fn deser(
13260        _version: MavlinkVersion,
13261        __input: &[u8],
13262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13263        let avail_len = __input.len();
13264        let mut payload_buf = [0; Self::ENCODED_LEN];
13265        let mut buf = if avail_len < Self::ENCODED_LEN {
13266            payload_buf[0..avail_len].copy_from_slice(__input);
13267            Bytes::new(&payload_buf)
13268        } else {
13269            Bytes::new(__input)
13270        };
13271        let mut __struct = Self::default();
13272        __struct.time_boot_ms = buf.get_u32_le()?;
13273        let tmp = buf.get_u32_le()?;
13274        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13275            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13276                flag_type: "GimbalManagerFlags",
13277                value: tmp as u64,
13278            })?;
13279        __struct.gimbal_device_id = buf.get_u8()?;
13280        __struct.primary_control_sysid = buf.get_u8()?;
13281        __struct.primary_control_compid = buf.get_u8()?;
13282        __struct.secondary_control_sysid = buf.get_u8()?;
13283        __struct.secondary_control_compid = buf.get_u8()?;
13284        Ok(__struct)
13285    }
13286    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13287        let mut __tmp = BytesMut::new(bytes);
13288        #[allow(clippy::absurd_extreme_comparisons)]
13289        #[allow(unused_comparisons)]
13290        if __tmp.remaining() < Self::ENCODED_LEN {
13291            panic!(
13292                "buffer is too small (need {} bytes, but got {})",
13293                Self::ENCODED_LEN,
13294                __tmp.remaining(),
13295            )
13296        }
13297        __tmp.put_u32_le(self.time_boot_ms);
13298        __tmp.put_u32_le(self.flags.bits() as u32);
13299        __tmp.put_u8(self.gimbal_device_id);
13300        __tmp.put_u8(self.primary_control_sysid);
13301        __tmp.put_u8(self.primary_control_compid);
13302        __tmp.put_u8(self.secondary_control_sysid);
13303        __tmp.put_u8(self.secondary_control_compid);
13304        if matches!(version, MavlinkVersion::V2) {
13305            let len = __tmp.len();
13306            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13307        } else {
13308            __tmp.len()
13309        }
13310    }
13311}
13312#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13313#[doc = ""]
13314#[doc = "ID: 33"]
13315#[derive(Debug, Clone, PartialEq)]
13316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13318#[cfg_attr(feature = "ts", derive(TS))]
13319#[cfg_attr(feature = "ts", ts(export))]
13320pub struct GLOBAL_POSITION_INT_DATA {
13321    #[doc = "Timestamp (time since system boot)."]
13322    pub time_boot_ms: u32,
13323    #[doc = "Latitude, expressed"]
13324    pub lat: i32,
13325    #[doc = "Longitude, expressed"]
13326    pub lon: i32,
13327    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13328    pub alt: i32,
13329    #[doc = "Altitude above home"]
13330    pub relative_alt: i32,
13331    #[doc = "Ground X Speed (Latitude, positive north)"]
13332    pub vx: i16,
13333    #[doc = "Ground Y Speed (Longitude, positive east)"]
13334    pub vy: i16,
13335    #[doc = "Ground Z Speed (Altitude, positive down)"]
13336    pub vz: i16,
13337    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13338    pub hdg: u16,
13339}
13340impl GLOBAL_POSITION_INT_DATA {
13341    pub const ENCODED_LEN: usize = 28usize;
13342    pub const DEFAULT: Self = Self {
13343        time_boot_ms: 0_u32,
13344        lat: 0_i32,
13345        lon: 0_i32,
13346        alt: 0_i32,
13347        relative_alt: 0_i32,
13348        vx: 0_i16,
13349        vy: 0_i16,
13350        vz: 0_i16,
13351        hdg: 0_u16,
13352    };
13353    #[cfg(feature = "arbitrary")]
13354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13355        use arbitrary::{Arbitrary, Unstructured};
13356        let mut buf = [0u8; 1024];
13357        rng.fill_bytes(&mut buf);
13358        let mut unstructured = Unstructured::new(&buf);
13359        Self::arbitrary(&mut unstructured).unwrap_or_default()
13360    }
13361}
13362impl Default for GLOBAL_POSITION_INT_DATA {
13363    fn default() -> Self {
13364        Self::DEFAULT.clone()
13365    }
13366}
13367impl MessageData for GLOBAL_POSITION_INT_DATA {
13368    type Message = MavMessage;
13369    const ID: u32 = 33u32;
13370    const NAME: &'static str = "GLOBAL_POSITION_INT";
13371    const EXTRA_CRC: u8 = 104u8;
13372    const ENCODED_LEN: usize = 28usize;
13373    fn deser(
13374        _version: MavlinkVersion,
13375        __input: &[u8],
13376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13377        let avail_len = __input.len();
13378        let mut payload_buf = [0; Self::ENCODED_LEN];
13379        let mut buf = if avail_len < Self::ENCODED_LEN {
13380            payload_buf[0..avail_len].copy_from_slice(__input);
13381            Bytes::new(&payload_buf)
13382        } else {
13383            Bytes::new(__input)
13384        };
13385        let mut __struct = Self::default();
13386        __struct.time_boot_ms = buf.get_u32_le()?;
13387        __struct.lat = buf.get_i32_le()?;
13388        __struct.lon = buf.get_i32_le()?;
13389        __struct.alt = buf.get_i32_le()?;
13390        __struct.relative_alt = buf.get_i32_le()?;
13391        __struct.vx = buf.get_i16_le()?;
13392        __struct.vy = buf.get_i16_le()?;
13393        __struct.vz = buf.get_i16_le()?;
13394        __struct.hdg = buf.get_u16_le()?;
13395        Ok(__struct)
13396    }
13397    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13398        let mut __tmp = BytesMut::new(bytes);
13399        #[allow(clippy::absurd_extreme_comparisons)]
13400        #[allow(unused_comparisons)]
13401        if __tmp.remaining() < Self::ENCODED_LEN {
13402            panic!(
13403                "buffer is too small (need {} bytes, but got {})",
13404                Self::ENCODED_LEN,
13405                __tmp.remaining(),
13406            )
13407        }
13408        __tmp.put_u32_le(self.time_boot_ms);
13409        __tmp.put_i32_le(self.lat);
13410        __tmp.put_i32_le(self.lon);
13411        __tmp.put_i32_le(self.alt);
13412        __tmp.put_i32_le(self.relative_alt);
13413        __tmp.put_i16_le(self.vx);
13414        __tmp.put_i16_le(self.vy);
13415        __tmp.put_i16_le(self.vz);
13416        __tmp.put_u16_le(self.hdg);
13417        if matches!(version, MavlinkVersion::V2) {
13418            let len = __tmp.len();
13419            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13420        } else {
13421            __tmp.len()
13422        }
13423    }
13424}
13425#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13426#[doc = ""]
13427#[doc = "ID: 63"]
13428#[derive(Debug, Clone, PartialEq)]
13429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13431#[cfg_attr(feature = "ts", derive(TS))]
13432#[cfg_attr(feature = "ts", ts(export))]
13433pub struct GLOBAL_POSITION_INT_COV_DATA {
13434    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13435    pub time_usec: u64,
13436    #[doc = "Latitude"]
13437    pub lat: i32,
13438    #[doc = "Longitude"]
13439    pub lon: i32,
13440    #[doc = "Altitude in meters above MSL"]
13441    pub alt: i32,
13442    #[doc = "Altitude above ground"]
13443    pub relative_alt: i32,
13444    #[doc = "Ground X Speed (Latitude)"]
13445    pub vx: f32,
13446    #[doc = "Ground Y Speed (Longitude)"]
13447    pub vy: f32,
13448    #[doc = "Ground Z Speed (Altitude)"]
13449    pub vz: f32,
13450    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13451    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13452    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13453    pub covariance: [f32; 36],
13454    #[doc = "Class id of the estimator this estimate originated from."]
13455    pub estimator_type: MavEstimatorType,
13456}
13457impl GLOBAL_POSITION_INT_COV_DATA {
13458    pub const ENCODED_LEN: usize = 181usize;
13459    pub const DEFAULT: Self = Self {
13460        time_usec: 0_u64,
13461        lat: 0_i32,
13462        lon: 0_i32,
13463        alt: 0_i32,
13464        relative_alt: 0_i32,
13465        vx: 0.0_f32,
13466        vy: 0.0_f32,
13467        vz: 0.0_f32,
13468        covariance: [0.0_f32; 36usize],
13469        estimator_type: MavEstimatorType::DEFAULT,
13470    };
13471    #[cfg(feature = "arbitrary")]
13472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13473        use arbitrary::{Arbitrary, Unstructured};
13474        let mut buf = [0u8; 1024];
13475        rng.fill_bytes(&mut buf);
13476        let mut unstructured = Unstructured::new(&buf);
13477        Self::arbitrary(&mut unstructured).unwrap_or_default()
13478    }
13479}
13480impl Default for GLOBAL_POSITION_INT_COV_DATA {
13481    fn default() -> Self {
13482        Self::DEFAULT.clone()
13483    }
13484}
13485impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13486    type Message = MavMessage;
13487    const ID: u32 = 63u32;
13488    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13489    const EXTRA_CRC: u8 = 119u8;
13490    const ENCODED_LEN: usize = 181usize;
13491    fn deser(
13492        _version: MavlinkVersion,
13493        __input: &[u8],
13494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13495        let avail_len = __input.len();
13496        let mut payload_buf = [0; Self::ENCODED_LEN];
13497        let mut buf = if avail_len < Self::ENCODED_LEN {
13498            payload_buf[0..avail_len].copy_from_slice(__input);
13499            Bytes::new(&payload_buf)
13500        } else {
13501            Bytes::new(__input)
13502        };
13503        let mut __struct = Self::default();
13504        __struct.time_usec = buf.get_u64_le()?;
13505        __struct.lat = buf.get_i32_le()?;
13506        __struct.lon = buf.get_i32_le()?;
13507        __struct.alt = buf.get_i32_le()?;
13508        __struct.relative_alt = buf.get_i32_le()?;
13509        __struct.vx = buf.get_f32_le()?;
13510        __struct.vy = buf.get_f32_le()?;
13511        __struct.vz = buf.get_f32_le()?;
13512        for v in &mut __struct.covariance {
13513            let val = buf.get_f32_le()?;
13514            *v = val;
13515        }
13516        let tmp = buf.get_u8()?;
13517        __struct.estimator_type =
13518            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13519                enum_type: "MavEstimatorType",
13520                value: tmp as u64,
13521            })?;
13522        Ok(__struct)
13523    }
13524    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13525        let mut __tmp = BytesMut::new(bytes);
13526        #[allow(clippy::absurd_extreme_comparisons)]
13527        #[allow(unused_comparisons)]
13528        if __tmp.remaining() < Self::ENCODED_LEN {
13529            panic!(
13530                "buffer is too small (need {} bytes, but got {})",
13531                Self::ENCODED_LEN,
13532                __tmp.remaining(),
13533            )
13534        }
13535        __tmp.put_u64_le(self.time_usec);
13536        __tmp.put_i32_le(self.lat);
13537        __tmp.put_i32_le(self.lon);
13538        __tmp.put_i32_le(self.alt);
13539        __tmp.put_i32_le(self.relative_alt);
13540        __tmp.put_f32_le(self.vx);
13541        __tmp.put_f32_le(self.vy);
13542        __tmp.put_f32_le(self.vz);
13543        for val in &self.covariance {
13544            __tmp.put_f32_le(*val);
13545        }
13546        __tmp.put_u8(self.estimator_type as u8);
13547        if matches!(version, MavlinkVersion::V2) {
13548            let len = __tmp.len();
13549            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13550        } else {
13551            __tmp.len()
13552        }
13553    }
13554}
13555#[doc = "Global position/attitude estimate from a vision source."]
13556#[doc = ""]
13557#[doc = "ID: 101"]
13558#[derive(Debug, Clone, PartialEq)]
13559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13561#[cfg_attr(feature = "ts", derive(TS))]
13562#[cfg_attr(feature = "ts", ts(export))]
13563pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13564    #[doc = "Timestamp (UNIX time or since system boot)"]
13565    pub usec: u64,
13566    #[doc = "Global X position"]
13567    pub x: f32,
13568    #[doc = "Global Y position"]
13569    pub y: f32,
13570    #[doc = "Global Z position"]
13571    pub z: f32,
13572    #[doc = "Roll angle"]
13573    pub roll: f32,
13574    #[doc = "Pitch angle"]
13575    pub pitch: f32,
13576    #[doc = "Yaw angle"]
13577    pub yaw: f32,
13578    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13579    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13580    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13581    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13582    pub covariance: [f32; 21],
13583    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13584    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13585    pub reset_counter: u8,
13586}
13587impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13588    pub const ENCODED_LEN: usize = 117usize;
13589    pub const DEFAULT: Self = Self {
13590        usec: 0_u64,
13591        x: 0.0_f32,
13592        y: 0.0_f32,
13593        z: 0.0_f32,
13594        roll: 0.0_f32,
13595        pitch: 0.0_f32,
13596        yaw: 0.0_f32,
13597        covariance: [0.0_f32; 21usize],
13598        reset_counter: 0_u8,
13599    };
13600    #[cfg(feature = "arbitrary")]
13601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13602        use arbitrary::{Arbitrary, Unstructured};
13603        let mut buf = [0u8; 1024];
13604        rng.fill_bytes(&mut buf);
13605        let mut unstructured = Unstructured::new(&buf);
13606        Self::arbitrary(&mut unstructured).unwrap_or_default()
13607    }
13608}
13609impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13610    fn default() -> Self {
13611        Self::DEFAULT.clone()
13612    }
13613}
13614impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13615    type Message = MavMessage;
13616    const ID: u32 = 101u32;
13617    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13618    const EXTRA_CRC: u8 = 102u8;
13619    const ENCODED_LEN: usize = 117usize;
13620    fn deser(
13621        _version: MavlinkVersion,
13622        __input: &[u8],
13623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13624        let avail_len = __input.len();
13625        let mut payload_buf = [0; Self::ENCODED_LEN];
13626        let mut buf = if avail_len < Self::ENCODED_LEN {
13627            payload_buf[0..avail_len].copy_from_slice(__input);
13628            Bytes::new(&payload_buf)
13629        } else {
13630            Bytes::new(__input)
13631        };
13632        let mut __struct = Self::default();
13633        __struct.usec = buf.get_u64_le()?;
13634        __struct.x = buf.get_f32_le()?;
13635        __struct.y = buf.get_f32_le()?;
13636        __struct.z = buf.get_f32_le()?;
13637        __struct.roll = buf.get_f32_le()?;
13638        __struct.pitch = buf.get_f32_le()?;
13639        __struct.yaw = buf.get_f32_le()?;
13640        for v in &mut __struct.covariance {
13641            let val = buf.get_f32_le()?;
13642            *v = val;
13643        }
13644        __struct.reset_counter = buf.get_u8()?;
13645        Ok(__struct)
13646    }
13647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13648        let mut __tmp = BytesMut::new(bytes);
13649        #[allow(clippy::absurd_extreme_comparisons)]
13650        #[allow(unused_comparisons)]
13651        if __tmp.remaining() < Self::ENCODED_LEN {
13652            panic!(
13653                "buffer is too small (need {} bytes, but got {})",
13654                Self::ENCODED_LEN,
13655                __tmp.remaining(),
13656            )
13657        }
13658        __tmp.put_u64_le(self.usec);
13659        __tmp.put_f32_le(self.x);
13660        __tmp.put_f32_le(self.y);
13661        __tmp.put_f32_le(self.z);
13662        __tmp.put_f32_le(self.roll);
13663        __tmp.put_f32_le(self.pitch);
13664        __tmp.put_f32_le(self.yaw);
13665        if matches!(version, MavlinkVersion::V2) {
13666            for val in &self.covariance {
13667                __tmp.put_f32_le(*val);
13668            }
13669            __tmp.put_u8(self.reset_counter);
13670            let len = __tmp.len();
13671            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13672        } else {
13673            __tmp.len()
13674        }
13675    }
13676}
13677#[doc = "Second GPS data."]
13678#[doc = ""]
13679#[doc = "ID: 124"]
13680#[derive(Debug, Clone, PartialEq)]
13681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13683#[cfg_attr(feature = "ts", derive(TS))]
13684#[cfg_attr(feature = "ts", ts(export))]
13685pub struct GPS2_RAW_DATA {
13686    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13687    pub time_usec: u64,
13688    #[doc = "Latitude (WGS84)"]
13689    pub lat: i32,
13690    #[doc = "Longitude (WGS84)"]
13691    pub lon: i32,
13692    #[doc = "Altitude (MSL). Positive for up."]
13693    pub alt: i32,
13694    #[doc = "Age of DGPS info"]
13695    pub dgps_age: u32,
13696    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13697    pub eph: u16,
13698    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13699    pub epv: u16,
13700    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13701    pub vel: u16,
13702    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13703    pub cog: u16,
13704    #[doc = "GPS fix type."]
13705    pub fix_type: GpsFixType,
13706    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13707    pub satellites_visible: u8,
13708    #[doc = "Number of DGPS satellites"]
13709    pub dgps_numch: u8,
13710    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13711    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13712    pub yaw: u16,
13713    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13714    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13715    pub alt_ellipsoid: i32,
13716    #[doc = "Position uncertainty."]
13717    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13718    pub h_acc: u32,
13719    #[doc = "Altitude uncertainty."]
13720    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13721    pub v_acc: u32,
13722    #[doc = "Speed uncertainty."]
13723    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13724    pub vel_acc: u32,
13725    #[doc = "Heading / track uncertainty"]
13726    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13727    pub hdg_acc: u32,
13728}
13729impl GPS2_RAW_DATA {
13730    pub const ENCODED_LEN: usize = 57usize;
13731    pub const DEFAULT: Self = Self {
13732        time_usec: 0_u64,
13733        lat: 0_i32,
13734        lon: 0_i32,
13735        alt: 0_i32,
13736        dgps_age: 0_u32,
13737        eph: 0_u16,
13738        epv: 0_u16,
13739        vel: 0_u16,
13740        cog: 0_u16,
13741        fix_type: GpsFixType::DEFAULT,
13742        satellites_visible: 0_u8,
13743        dgps_numch: 0_u8,
13744        yaw: 0_u16,
13745        alt_ellipsoid: 0_i32,
13746        h_acc: 0_u32,
13747        v_acc: 0_u32,
13748        vel_acc: 0_u32,
13749        hdg_acc: 0_u32,
13750    };
13751    #[cfg(feature = "arbitrary")]
13752    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13753        use arbitrary::{Arbitrary, Unstructured};
13754        let mut buf = [0u8; 1024];
13755        rng.fill_bytes(&mut buf);
13756        let mut unstructured = Unstructured::new(&buf);
13757        Self::arbitrary(&mut unstructured).unwrap_or_default()
13758    }
13759}
13760impl Default for GPS2_RAW_DATA {
13761    fn default() -> Self {
13762        Self::DEFAULT.clone()
13763    }
13764}
13765impl MessageData for GPS2_RAW_DATA {
13766    type Message = MavMessage;
13767    const ID: u32 = 124u32;
13768    const NAME: &'static str = "GPS2_RAW";
13769    const EXTRA_CRC: u8 = 87u8;
13770    const ENCODED_LEN: usize = 57usize;
13771    fn deser(
13772        _version: MavlinkVersion,
13773        __input: &[u8],
13774    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13775        let avail_len = __input.len();
13776        let mut payload_buf = [0; Self::ENCODED_LEN];
13777        let mut buf = if avail_len < Self::ENCODED_LEN {
13778            payload_buf[0..avail_len].copy_from_slice(__input);
13779            Bytes::new(&payload_buf)
13780        } else {
13781            Bytes::new(__input)
13782        };
13783        let mut __struct = Self::default();
13784        __struct.time_usec = buf.get_u64_le()?;
13785        __struct.lat = buf.get_i32_le()?;
13786        __struct.lon = buf.get_i32_le()?;
13787        __struct.alt = buf.get_i32_le()?;
13788        __struct.dgps_age = buf.get_u32_le()?;
13789        __struct.eph = buf.get_u16_le()?;
13790        __struct.epv = buf.get_u16_le()?;
13791        __struct.vel = buf.get_u16_le()?;
13792        __struct.cog = buf.get_u16_le()?;
13793        let tmp = buf.get_u8()?;
13794        __struct.fix_type =
13795            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13796                enum_type: "GpsFixType",
13797                value: tmp as u64,
13798            })?;
13799        __struct.satellites_visible = buf.get_u8()?;
13800        __struct.dgps_numch = buf.get_u8()?;
13801        __struct.yaw = buf.get_u16_le()?;
13802        __struct.alt_ellipsoid = buf.get_i32_le()?;
13803        __struct.h_acc = buf.get_u32_le()?;
13804        __struct.v_acc = buf.get_u32_le()?;
13805        __struct.vel_acc = buf.get_u32_le()?;
13806        __struct.hdg_acc = buf.get_u32_le()?;
13807        Ok(__struct)
13808    }
13809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13810        let mut __tmp = BytesMut::new(bytes);
13811        #[allow(clippy::absurd_extreme_comparisons)]
13812        #[allow(unused_comparisons)]
13813        if __tmp.remaining() < Self::ENCODED_LEN {
13814            panic!(
13815                "buffer is too small (need {} bytes, but got {})",
13816                Self::ENCODED_LEN,
13817                __tmp.remaining(),
13818            )
13819        }
13820        __tmp.put_u64_le(self.time_usec);
13821        __tmp.put_i32_le(self.lat);
13822        __tmp.put_i32_le(self.lon);
13823        __tmp.put_i32_le(self.alt);
13824        __tmp.put_u32_le(self.dgps_age);
13825        __tmp.put_u16_le(self.eph);
13826        __tmp.put_u16_le(self.epv);
13827        __tmp.put_u16_le(self.vel);
13828        __tmp.put_u16_le(self.cog);
13829        __tmp.put_u8(self.fix_type as u8);
13830        __tmp.put_u8(self.satellites_visible);
13831        __tmp.put_u8(self.dgps_numch);
13832        if matches!(version, MavlinkVersion::V2) {
13833            __tmp.put_u16_le(self.yaw);
13834            __tmp.put_i32_le(self.alt_ellipsoid);
13835            __tmp.put_u32_le(self.h_acc);
13836            __tmp.put_u32_le(self.v_acc);
13837            __tmp.put_u32_le(self.vel_acc);
13838            __tmp.put_u32_le(self.hdg_acc);
13839            let len = __tmp.len();
13840            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13841        } else {
13842            __tmp.len()
13843        }
13844    }
13845}
13846#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13847#[doc = ""]
13848#[doc = "ID: 128"]
13849#[derive(Debug, Clone, PartialEq)]
13850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13852#[cfg_attr(feature = "ts", derive(TS))]
13853#[cfg_attr(feature = "ts", ts(export))]
13854pub struct GPS2_RTK_DATA {
13855    #[doc = "Time since boot of last baseline message received."]
13856    pub time_last_baseline_ms: u32,
13857    #[doc = "GPS Time of Week of last baseline"]
13858    pub tow: u32,
13859    #[doc = "Current baseline in ECEF x or NED north component."]
13860    pub baseline_a_mm: i32,
13861    #[doc = "Current baseline in ECEF y or NED east component."]
13862    pub baseline_b_mm: i32,
13863    #[doc = "Current baseline in ECEF z or NED down component."]
13864    pub baseline_c_mm: i32,
13865    #[doc = "Current estimate of baseline accuracy."]
13866    pub accuracy: u32,
13867    #[doc = "Current number of integer ambiguity hypotheses."]
13868    pub iar_num_hypotheses: i32,
13869    #[doc = "GPS Week Number of last baseline"]
13870    pub wn: u16,
13871    #[doc = "Identification of connected RTK receiver."]
13872    pub rtk_receiver_id: u8,
13873    #[doc = "GPS-specific health report for RTK data."]
13874    pub rtk_health: u8,
13875    #[doc = "Rate of baseline messages being received by GPS"]
13876    pub rtk_rate: u8,
13877    #[doc = "Current number of sats used for RTK calculation."]
13878    pub nsats: u8,
13879    #[doc = "Coordinate system of baseline"]
13880    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13881}
13882impl GPS2_RTK_DATA {
13883    pub const ENCODED_LEN: usize = 35usize;
13884    pub const DEFAULT: Self = Self {
13885        time_last_baseline_ms: 0_u32,
13886        tow: 0_u32,
13887        baseline_a_mm: 0_i32,
13888        baseline_b_mm: 0_i32,
13889        baseline_c_mm: 0_i32,
13890        accuracy: 0_u32,
13891        iar_num_hypotheses: 0_i32,
13892        wn: 0_u16,
13893        rtk_receiver_id: 0_u8,
13894        rtk_health: 0_u8,
13895        rtk_rate: 0_u8,
13896        nsats: 0_u8,
13897        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13898    };
13899    #[cfg(feature = "arbitrary")]
13900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13901        use arbitrary::{Arbitrary, Unstructured};
13902        let mut buf = [0u8; 1024];
13903        rng.fill_bytes(&mut buf);
13904        let mut unstructured = Unstructured::new(&buf);
13905        Self::arbitrary(&mut unstructured).unwrap_or_default()
13906    }
13907}
13908impl Default for GPS2_RTK_DATA {
13909    fn default() -> Self {
13910        Self::DEFAULT.clone()
13911    }
13912}
13913impl MessageData for GPS2_RTK_DATA {
13914    type Message = MavMessage;
13915    const ID: u32 = 128u32;
13916    const NAME: &'static str = "GPS2_RTK";
13917    const EXTRA_CRC: u8 = 226u8;
13918    const ENCODED_LEN: usize = 35usize;
13919    fn deser(
13920        _version: MavlinkVersion,
13921        __input: &[u8],
13922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13923        let avail_len = __input.len();
13924        let mut payload_buf = [0; Self::ENCODED_LEN];
13925        let mut buf = if avail_len < Self::ENCODED_LEN {
13926            payload_buf[0..avail_len].copy_from_slice(__input);
13927            Bytes::new(&payload_buf)
13928        } else {
13929            Bytes::new(__input)
13930        };
13931        let mut __struct = Self::default();
13932        __struct.time_last_baseline_ms = buf.get_u32_le()?;
13933        __struct.tow = buf.get_u32_le()?;
13934        __struct.baseline_a_mm = buf.get_i32_le()?;
13935        __struct.baseline_b_mm = buf.get_i32_le()?;
13936        __struct.baseline_c_mm = buf.get_i32_le()?;
13937        __struct.accuracy = buf.get_u32_le()?;
13938        __struct.iar_num_hypotheses = buf.get_i32_le()?;
13939        __struct.wn = buf.get_u16_le()?;
13940        __struct.rtk_receiver_id = buf.get_u8()?;
13941        __struct.rtk_health = buf.get_u8()?;
13942        __struct.rtk_rate = buf.get_u8()?;
13943        __struct.nsats = buf.get_u8()?;
13944        let tmp = buf.get_u8()?;
13945        __struct.baseline_coords_type =
13946            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13947                enum_type: "RtkBaselineCoordinateSystem",
13948                value: tmp as u64,
13949            })?;
13950        Ok(__struct)
13951    }
13952    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13953        let mut __tmp = BytesMut::new(bytes);
13954        #[allow(clippy::absurd_extreme_comparisons)]
13955        #[allow(unused_comparisons)]
13956        if __tmp.remaining() < Self::ENCODED_LEN {
13957            panic!(
13958                "buffer is too small (need {} bytes, but got {})",
13959                Self::ENCODED_LEN,
13960                __tmp.remaining(),
13961            )
13962        }
13963        __tmp.put_u32_le(self.time_last_baseline_ms);
13964        __tmp.put_u32_le(self.tow);
13965        __tmp.put_i32_le(self.baseline_a_mm);
13966        __tmp.put_i32_le(self.baseline_b_mm);
13967        __tmp.put_i32_le(self.baseline_c_mm);
13968        __tmp.put_u32_le(self.accuracy);
13969        __tmp.put_i32_le(self.iar_num_hypotheses);
13970        __tmp.put_u16_le(self.wn);
13971        __tmp.put_u8(self.rtk_receiver_id);
13972        __tmp.put_u8(self.rtk_health);
13973        __tmp.put_u8(self.rtk_rate);
13974        __tmp.put_u8(self.nsats);
13975        __tmp.put_u8(self.baseline_coords_type as u8);
13976        if matches!(version, MavlinkVersion::V2) {
13977            let len = __tmp.len();
13978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13979        } else {
13980            __tmp.len()
13981        }
13982    }
13983}
13984#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13985#[doc = ""]
13986#[doc = "ID: 49"]
13987#[derive(Debug, Clone, PartialEq)]
13988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13989#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13990#[cfg_attr(feature = "ts", derive(TS))]
13991#[cfg_attr(feature = "ts", ts(export))]
13992pub struct GPS_GLOBAL_ORIGIN_DATA {
13993    #[doc = "Latitude (WGS84)"]
13994    pub latitude: i32,
13995    #[doc = "Longitude (WGS84)"]
13996    pub longitude: i32,
13997    #[doc = "Altitude (MSL). Positive for up."]
13998    pub altitude: i32,
13999    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14000    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14001    pub time_usec: u64,
14002}
14003impl GPS_GLOBAL_ORIGIN_DATA {
14004    pub const ENCODED_LEN: usize = 20usize;
14005    pub const DEFAULT: Self = Self {
14006        latitude: 0_i32,
14007        longitude: 0_i32,
14008        altitude: 0_i32,
14009        time_usec: 0_u64,
14010    };
14011    #[cfg(feature = "arbitrary")]
14012    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14013        use arbitrary::{Arbitrary, Unstructured};
14014        let mut buf = [0u8; 1024];
14015        rng.fill_bytes(&mut buf);
14016        let mut unstructured = Unstructured::new(&buf);
14017        Self::arbitrary(&mut unstructured).unwrap_or_default()
14018    }
14019}
14020impl Default for GPS_GLOBAL_ORIGIN_DATA {
14021    fn default() -> Self {
14022        Self::DEFAULT.clone()
14023    }
14024}
14025impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14026    type Message = MavMessage;
14027    const ID: u32 = 49u32;
14028    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14029    const EXTRA_CRC: u8 = 39u8;
14030    const ENCODED_LEN: usize = 20usize;
14031    fn deser(
14032        _version: MavlinkVersion,
14033        __input: &[u8],
14034    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14035        let avail_len = __input.len();
14036        let mut payload_buf = [0; Self::ENCODED_LEN];
14037        let mut buf = if avail_len < Self::ENCODED_LEN {
14038            payload_buf[0..avail_len].copy_from_slice(__input);
14039            Bytes::new(&payload_buf)
14040        } else {
14041            Bytes::new(__input)
14042        };
14043        let mut __struct = Self::default();
14044        __struct.latitude = buf.get_i32_le()?;
14045        __struct.longitude = buf.get_i32_le()?;
14046        __struct.altitude = buf.get_i32_le()?;
14047        __struct.time_usec = buf.get_u64_le()?;
14048        Ok(__struct)
14049    }
14050    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14051        let mut __tmp = BytesMut::new(bytes);
14052        #[allow(clippy::absurd_extreme_comparisons)]
14053        #[allow(unused_comparisons)]
14054        if __tmp.remaining() < Self::ENCODED_LEN {
14055            panic!(
14056                "buffer is too small (need {} bytes, but got {})",
14057                Self::ENCODED_LEN,
14058                __tmp.remaining(),
14059            )
14060        }
14061        __tmp.put_i32_le(self.latitude);
14062        __tmp.put_i32_le(self.longitude);
14063        __tmp.put_i32_le(self.altitude);
14064        if matches!(version, MavlinkVersion::V2) {
14065            __tmp.put_u64_le(self.time_usec);
14066            let len = __tmp.len();
14067            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14068        } else {
14069            __tmp.len()
14070        }
14071    }
14072}
14073#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14074#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14075#[doc = ""]
14076#[doc = "ID: 123"]
14077#[derive(Debug, Clone, PartialEq)]
14078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14080#[cfg_attr(feature = "ts", derive(TS))]
14081#[cfg_attr(feature = "ts", ts(export))]
14082pub struct GPS_INJECT_DATA_DATA {
14083    #[doc = "System ID"]
14084    pub target_system: u8,
14085    #[doc = "Component ID"]
14086    pub target_component: u8,
14087    #[doc = "Data length"]
14088    pub len: u8,
14089    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14090    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14091    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14092    pub data: [u8; 110],
14093}
14094impl GPS_INJECT_DATA_DATA {
14095    pub const ENCODED_LEN: usize = 113usize;
14096    pub const DEFAULT: Self = Self {
14097        target_system: 0_u8,
14098        target_component: 0_u8,
14099        len: 0_u8,
14100        data: [0_u8; 110usize],
14101    };
14102    #[cfg(feature = "arbitrary")]
14103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14104        use arbitrary::{Arbitrary, Unstructured};
14105        let mut buf = [0u8; 1024];
14106        rng.fill_bytes(&mut buf);
14107        let mut unstructured = Unstructured::new(&buf);
14108        Self::arbitrary(&mut unstructured).unwrap_or_default()
14109    }
14110}
14111impl Default for GPS_INJECT_DATA_DATA {
14112    fn default() -> Self {
14113        Self::DEFAULT.clone()
14114    }
14115}
14116impl MessageData for GPS_INJECT_DATA_DATA {
14117    type Message = MavMessage;
14118    const ID: u32 = 123u32;
14119    const NAME: &'static str = "GPS_INJECT_DATA";
14120    const EXTRA_CRC: u8 = 250u8;
14121    const ENCODED_LEN: usize = 113usize;
14122    fn deser(
14123        _version: MavlinkVersion,
14124        __input: &[u8],
14125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14126        let avail_len = __input.len();
14127        let mut payload_buf = [0; Self::ENCODED_LEN];
14128        let mut buf = if avail_len < Self::ENCODED_LEN {
14129            payload_buf[0..avail_len].copy_from_slice(__input);
14130            Bytes::new(&payload_buf)
14131        } else {
14132            Bytes::new(__input)
14133        };
14134        let mut __struct = Self::default();
14135        __struct.target_system = buf.get_u8()?;
14136        __struct.target_component = buf.get_u8()?;
14137        __struct.len = buf.get_u8()?;
14138        for v in &mut __struct.data {
14139            let val = buf.get_u8()?;
14140            *v = val;
14141        }
14142        Ok(__struct)
14143    }
14144    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14145        let mut __tmp = BytesMut::new(bytes);
14146        #[allow(clippy::absurd_extreme_comparisons)]
14147        #[allow(unused_comparisons)]
14148        if __tmp.remaining() < Self::ENCODED_LEN {
14149            panic!(
14150                "buffer is too small (need {} bytes, but got {})",
14151                Self::ENCODED_LEN,
14152                __tmp.remaining(),
14153            )
14154        }
14155        __tmp.put_u8(self.target_system);
14156        __tmp.put_u8(self.target_component);
14157        __tmp.put_u8(self.len);
14158        for val in &self.data {
14159            __tmp.put_u8(*val);
14160        }
14161        if matches!(version, MavlinkVersion::V2) {
14162            let len = __tmp.len();
14163            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14164        } else {
14165            __tmp.len()
14166        }
14167    }
14168}
14169#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14170#[doc = ""]
14171#[doc = "ID: 232"]
14172#[derive(Debug, Clone, PartialEq)]
14173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14175#[cfg_attr(feature = "ts", derive(TS))]
14176#[cfg_attr(feature = "ts", ts(export))]
14177pub struct GPS_INPUT_DATA {
14178    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14179    pub time_usec: u64,
14180    #[doc = "GPS time (from start of GPS week)"]
14181    pub time_week_ms: u32,
14182    #[doc = "Latitude (WGS84)"]
14183    pub lat: i32,
14184    #[doc = "Longitude (WGS84)"]
14185    pub lon: i32,
14186    #[doc = "Altitude (MSL). Positive for up."]
14187    pub alt: f32,
14188    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14189    pub hdop: f32,
14190    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14191    pub vdop: f32,
14192    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14193    pub vn: f32,
14194    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14195    pub ve: f32,
14196    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14197    pub vd: f32,
14198    #[doc = "GPS speed accuracy"]
14199    pub speed_accuracy: f32,
14200    #[doc = "GPS horizontal accuracy"]
14201    pub horiz_accuracy: f32,
14202    #[doc = "GPS vertical accuracy"]
14203    pub vert_accuracy: f32,
14204    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14205    pub ignore_flags: GpsInputIgnoreFlags,
14206    #[doc = "GPS week number"]
14207    pub time_week: u16,
14208    #[doc = "ID of the GPS for multiple GPS inputs"]
14209    pub gps_id: u8,
14210    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14211    pub fix_type: u8,
14212    #[doc = "Number of satellites visible."]
14213    pub satellites_visible: u8,
14214    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14215    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14216    pub yaw: u16,
14217}
14218impl GPS_INPUT_DATA {
14219    pub const ENCODED_LEN: usize = 65usize;
14220    pub const DEFAULT: Self = Self {
14221        time_usec: 0_u64,
14222        time_week_ms: 0_u32,
14223        lat: 0_i32,
14224        lon: 0_i32,
14225        alt: 0.0_f32,
14226        hdop: 0.0_f32,
14227        vdop: 0.0_f32,
14228        vn: 0.0_f32,
14229        ve: 0.0_f32,
14230        vd: 0.0_f32,
14231        speed_accuracy: 0.0_f32,
14232        horiz_accuracy: 0.0_f32,
14233        vert_accuracy: 0.0_f32,
14234        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14235        time_week: 0_u16,
14236        gps_id: 0_u8,
14237        fix_type: 0_u8,
14238        satellites_visible: 0_u8,
14239        yaw: 0_u16,
14240    };
14241    #[cfg(feature = "arbitrary")]
14242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14243        use arbitrary::{Arbitrary, Unstructured};
14244        let mut buf = [0u8; 1024];
14245        rng.fill_bytes(&mut buf);
14246        let mut unstructured = Unstructured::new(&buf);
14247        Self::arbitrary(&mut unstructured).unwrap_or_default()
14248    }
14249}
14250impl Default for GPS_INPUT_DATA {
14251    fn default() -> Self {
14252        Self::DEFAULT.clone()
14253    }
14254}
14255impl MessageData for GPS_INPUT_DATA {
14256    type Message = MavMessage;
14257    const ID: u32 = 232u32;
14258    const NAME: &'static str = "GPS_INPUT";
14259    const EXTRA_CRC: u8 = 151u8;
14260    const ENCODED_LEN: usize = 65usize;
14261    fn deser(
14262        _version: MavlinkVersion,
14263        __input: &[u8],
14264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14265        let avail_len = __input.len();
14266        let mut payload_buf = [0; Self::ENCODED_LEN];
14267        let mut buf = if avail_len < Self::ENCODED_LEN {
14268            payload_buf[0..avail_len].copy_from_slice(__input);
14269            Bytes::new(&payload_buf)
14270        } else {
14271            Bytes::new(__input)
14272        };
14273        let mut __struct = Self::default();
14274        __struct.time_usec = buf.get_u64_le()?;
14275        __struct.time_week_ms = buf.get_u32_le()?;
14276        __struct.lat = buf.get_i32_le()?;
14277        __struct.lon = buf.get_i32_le()?;
14278        __struct.alt = buf.get_f32_le()?;
14279        __struct.hdop = buf.get_f32_le()?;
14280        __struct.vdop = buf.get_f32_le()?;
14281        __struct.vn = buf.get_f32_le()?;
14282        __struct.ve = buf.get_f32_le()?;
14283        __struct.vd = buf.get_f32_le()?;
14284        __struct.speed_accuracy = buf.get_f32_le()?;
14285        __struct.horiz_accuracy = buf.get_f32_le()?;
14286        __struct.vert_accuracy = buf.get_f32_le()?;
14287        let tmp = buf.get_u16_le()?;
14288        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14289            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
14290        )
14291        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14292            flag_type: "GpsInputIgnoreFlags",
14293            value: tmp as u64,
14294        })?;
14295        __struct.time_week = buf.get_u16_le()?;
14296        __struct.gps_id = buf.get_u8()?;
14297        __struct.fix_type = buf.get_u8()?;
14298        __struct.satellites_visible = buf.get_u8()?;
14299        __struct.yaw = buf.get_u16_le()?;
14300        Ok(__struct)
14301    }
14302    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14303        let mut __tmp = BytesMut::new(bytes);
14304        #[allow(clippy::absurd_extreme_comparisons)]
14305        #[allow(unused_comparisons)]
14306        if __tmp.remaining() < Self::ENCODED_LEN {
14307            panic!(
14308                "buffer is too small (need {} bytes, but got {})",
14309                Self::ENCODED_LEN,
14310                __tmp.remaining(),
14311            )
14312        }
14313        __tmp.put_u64_le(self.time_usec);
14314        __tmp.put_u32_le(self.time_week_ms);
14315        __tmp.put_i32_le(self.lat);
14316        __tmp.put_i32_le(self.lon);
14317        __tmp.put_f32_le(self.alt);
14318        __tmp.put_f32_le(self.hdop);
14319        __tmp.put_f32_le(self.vdop);
14320        __tmp.put_f32_le(self.vn);
14321        __tmp.put_f32_le(self.ve);
14322        __tmp.put_f32_le(self.vd);
14323        __tmp.put_f32_le(self.speed_accuracy);
14324        __tmp.put_f32_le(self.horiz_accuracy);
14325        __tmp.put_f32_le(self.vert_accuracy);
14326        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
14327        __tmp.put_u16_le(self.time_week);
14328        __tmp.put_u8(self.gps_id);
14329        __tmp.put_u8(self.fix_type);
14330        __tmp.put_u8(self.satellites_visible);
14331        if matches!(version, MavlinkVersion::V2) {
14332            __tmp.put_u16_le(self.yaw);
14333            let len = __tmp.len();
14334            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14335        } else {
14336            __tmp.len()
14337        }
14338    }
14339}
14340#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14341#[doc = ""]
14342#[doc = "ID: 24"]
14343#[derive(Debug, Clone, PartialEq)]
14344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14346#[cfg_attr(feature = "ts", derive(TS))]
14347#[cfg_attr(feature = "ts", ts(export))]
14348pub struct GPS_RAW_INT_DATA {
14349    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14350    pub time_usec: u64,
14351    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14352    pub lat: i32,
14353    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14354    pub lon: i32,
14355    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14356    pub alt: i32,
14357    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14358    pub eph: u16,
14359    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14360    pub epv: u16,
14361    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14362    pub vel: u16,
14363    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14364    pub cog: u16,
14365    #[doc = "GPS fix type."]
14366    pub fix_type: GpsFixType,
14367    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14368    pub satellites_visible: u8,
14369    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14371    pub alt_ellipsoid: i32,
14372    #[doc = "Position uncertainty."]
14373    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14374    pub h_acc: u32,
14375    #[doc = "Altitude uncertainty."]
14376    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14377    pub v_acc: u32,
14378    #[doc = "Speed uncertainty."]
14379    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14380    pub vel_acc: u32,
14381    #[doc = "Heading / track uncertainty"]
14382    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14383    pub hdg_acc: u32,
14384    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14385    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14386    pub yaw: u16,
14387}
14388impl GPS_RAW_INT_DATA {
14389    pub const ENCODED_LEN: usize = 52usize;
14390    pub const DEFAULT: Self = Self {
14391        time_usec: 0_u64,
14392        lat: 0_i32,
14393        lon: 0_i32,
14394        alt: 0_i32,
14395        eph: 0_u16,
14396        epv: 0_u16,
14397        vel: 0_u16,
14398        cog: 0_u16,
14399        fix_type: GpsFixType::DEFAULT,
14400        satellites_visible: 0_u8,
14401        alt_ellipsoid: 0_i32,
14402        h_acc: 0_u32,
14403        v_acc: 0_u32,
14404        vel_acc: 0_u32,
14405        hdg_acc: 0_u32,
14406        yaw: 0_u16,
14407    };
14408    #[cfg(feature = "arbitrary")]
14409    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14410        use arbitrary::{Arbitrary, Unstructured};
14411        let mut buf = [0u8; 1024];
14412        rng.fill_bytes(&mut buf);
14413        let mut unstructured = Unstructured::new(&buf);
14414        Self::arbitrary(&mut unstructured).unwrap_or_default()
14415    }
14416}
14417impl Default for GPS_RAW_INT_DATA {
14418    fn default() -> Self {
14419        Self::DEFAULT.clone()
14420    }
14421}
14422impl MessageData for GPS_RAW_INT_DATA {
14423    type Message = MavMessage;
14424    const ID: u32 = 24u32;
14425    const NAME: &'static str = "GPS_RAW_INT";
14426    const EXTRA_CRC: u8 = 24u8;
14427    const ENCODED_LEN: usize = 52usize;
14428    fn deser(
14429        _version: MavlinkVersion,
14430        __input: &[u8],
14431    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14432        let avail_len = __input.len();
14433        let mut payload_buf = [0; Self::ENCODED_LEN];
14434        let mut buf = if avail_len < Self::ENCODED_LEN {
14435            payload_buf[0..avail_len].copy_from_slice(__input);
14436            Bytes::new(&payload_buf)
14437        } else {
14438            Bytes::new(__input)
14439        };
14440        let mut __struct = Self::default();
14441        __struct.time_usec = buf.get_u64_le()?;
14442        __struct.lat = buf.get_i32_le()?;
14443        __struct.lon = buf.get_i32_le()?;
14444        __struct.alt = buf.get_i32_le()?;
14445        __struct.eph = buf.get_u16_le()?;
14446        __struct.epv = buf.get_u16_le()?;
14447        __struct.vel = buf.get_u16_le()?;
14448        __struct.cog = buf.get_u16_le()?;
14449        let tmp = buf.get_u8()?;
14450        __struct.fix_type =
14451            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14452                enum_type: "GpsFixType",
14453                value: tmp as u64,
14454            })?;
14455        __struct.satellites_visible = buf.get_u8()?;
14456        __struct.alt_ellipsoid = buf.get_i32_le()?;
14457        __struct.h_acc = buf.get_u32_le()?;
14458        __struct.v_acc = buf.get_u32_le()?;
14459        __struct.vel_acc = buf.get_u32_le()?;
14460        __struct.hdg_acc = buf.get_u32_le()?;
14461        __struct.yaw = buf.get_u16_le()?;
14462        Ok(__struct)
14463    }
14464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14465        let mut __tmp = BytesMut::new(bytes);
14466        #[allow(clippy::absurd_extreme_comparisons)]
14467        #[allow(unused_comparisons)]
14468        if __tmp.remaining() < Self::ENCODED_LEN {
14469            panic!(
14470                "buffer is too small (need {} bytes, but got {})",
14471                Self::ENCODED_LEN,
14472                __tmp.remaining(),
14473            )
14474        }
14475        __tmp.put_u64_le(self.time_usec);
14476        __tmp.put_i32_le(self.lat);
14477        __tmp.put_i32_le(self.lon);
14478        __tmp.put_i32_le(self.alt);
14479        __tmp.put_u16_le(self.eph);
14480        __tmp.put_u16_le(self.epv);
14481        __tmp.put_u16_le(self.vel);
14482        __tmp.put_u16_le(self.cog);
14483        __tmp.put_u8(self.fix_type as u8);
14484        __tmp.put_u8(self.satellites_visible);
14485        if matches!(version, MavlinkVersion::V2) {
14486            __tmp.put_i32_le(self.alt_ellipsoid);
14487            __tmp.put_u32_le(self.h_acc);
14488            __tmp.put_u32_le(self.v_acc);
14489            __tmp.put_u32_le(self.vel_acc);
14490            __tmp.put_u32_le(self.hdg_acc);
14491            __tmp.put_u16_le(self.yaw);
14492            let len = __tmp.len();
14493            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14494        } else {
14495            __tmp.len()
14496        }
14497    }
14498}
14499#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14500#[doc = ""]
14501#[doc = "ID: 233"]
14502#[derive(Debug, Clone, PartialEq)]
14503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14505#[cfg_attr(feature = "ts", derive(TS))]
14506#[cfg_attr(feature = "ts", ts(export))]
14507pub struct GPS_RTCM_DATA_DATA {
14508    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14509    pub flags: u8,
14510    #[doc = "data length"]
14511    pub len: u8,
14512    #[doc = "RTCM message (may be fragmented)"]
14513    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14514    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14515    pub data: [u8; 180],
14516}
14517impl GPS_RTCM_DATA_DATA {
14518    pub const ENCODED_LEN: usize = 182usize;
14519    pub const DEFAULT: Self = Self {
14520        flags: 0_u8,
14521        len: 0_u8,
14522        data: [0_u8; 180usize],
14523    };
14524    #[cfg(feature = "arbitrary")]
14525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14526        use arbitrary::{Arbitrary, Unstructured};
14527        let mut buf = [0u8; 1024];
14528        rng.fill_bytes(&mut buf);
14529        let mut unstructured = Unstructured::new(&buf);
14530        Self::arbitrary(&mut unstructured).unwrap_or_default()
14531    }
14532}
14533impl Default for GPS_RTCM_DATA_DATA {
14534    fn default() -> Self {
14535        Self::DEFAULT.clone()
14536    }
14537}
14538impl MessageData for GPS_RTCM_DATA_DATA {
14539    type Message = MavMessage;
14540    const ID: u32 = 233u32;
14541    const NAME: &'static str = "GPS_RTCM_DATA";
14542    const EXTRA_CRC: u8 = 35u8;
14543    const ENCODED_LEN: usize = 182usize;
14544    fn deser(
14545        _version: MavlinkVersion,
14546        __input: &[u8],
14547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14548        let avail_len = __input.len();
14549        let mut payload_buf = [0; Self::ENCODED_LEN];
14550        let mut buf = if avail_len < Self::ENCODED_LEN {
14551            payload_buf[0..avail_len].copy_from_slice(__input);
14552            Bytes::new(&payload_buf)
14553        } else {
14554            Bytes::new(__input)
14555        };
14556        let mut __struct = Self::default();
14557        __struct.flags = buf.get_u8()?;
14558        __struct.len = buf.get_u8()?;
14559        for v in &mut __struct.data {
14560            let val = buf.get_u8()?;
14561            *v = val;
14562        }
14563        Ok(__struct)
14564    }
14565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14566        let mut __tmp = BytesMut::new(bytes);
14567        #[allow(clippy::absurd_extreme_comparisons)]
14568        #[allow(unused_comparisons)]
14569        if __tmp.remaining() < Self::ENCODED_LEN {
14570            panic!(
14571                "buffer is too small (need {} bytes, but got {})",
14572                Self::ENCODED_LEN,
14573                __tmp.remaining(),
14574            )
14575        }
14576        __tmp.put_u8(self.flags);
14577        __tmp.put_u8(self.len);
14578        for val in &self.data {
14579            __tmp.put_u8(*val);
14580        }
14581        if matches!(version, MavlinkVersion::V2) {
14582            let len = __tmp.len();
14583            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14584        } else {
14585            __tmp.len()
14586        }
14587    }
14588}
14589#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14590#[doc = ""]
14591#[doc = "ID: 127"]
14592#[derive(Debug, Clone, PartialEq)]
14593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14595#[cfg_attr(feature = "ts", derive(TS))]
14596#[cfg_attr(feature = "ts", ts(export))]
14597pub struct GPS_RTK_DATA {
14598    #[doc = "Time since boot of last baseline message received."]
14599    pub time_last_baseline_ms: u32,
14600    #[doc = "GPS Time of Week of last baseline"]
14601    pub tow: u32,
14602    #[doc = "Current baseline in ECEF x or NED north component."]
14603    pub baseline_a_mm: i32,
14604    #[doc = "Current baseline in ECEF y or NED east component."]
14605    pub baseline_b_mm: i32,
14606    #[doc = "Current baseline in ECEF z or NED down component."]
14607    pub baseline_c_mm: i32,
14608    #[doc = "Current estimate of baseline accuracy."]
14609    pub accuracy: u32,
14610    #[doc = "Current number of integer ambiguity hypotheses."]
14611    pub iar_num_hypotheses: i32,
14612    #[doc = "GPS Week Number of last baseline"]
14613    pub wn: u16,
14614    #[doc = "Identification of connected RTK receiver."]
14615    pub rtk_receiver_id: u8,
14616    #[doc = "GPS-specific health report for RTK data."]
14617    pub rtk_health: u8,
14618    #[doc = "Rate of baseline messages being received by GPS"]
14619    pub rtk_rate: u8,
14620    #[doc = "Current number of sats used for RTK calculation."]
14621    pub nsats: u8,
14622    #[doc = "Coordinate system of baseline"]
14623    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14624}
14625impl GPS_RTK_DATA {
14626    pub const ENCODED_LEN: usize = 35usize;
14627    pub const DEFAULT: Self = Self {
14628        time_last_baseline_ms: 0_u32,
14629        tow: 0_u32,
14630        baseline_a_mm: 0_i32,
14631        baseline_b_mm: 0_i32,
14632        baseline_c_mm: 0_i32,
14633        accuracy: 0_u32,
14634        iar_num_hypotheses: 0_i32,
14635        wn: 0_u16,
14636        rtk_receiver_id: 0_u8,
14637        rtk_health: 0_u8,
14638        rtk_rate: 0_u8,
14639        nsats: 0_u8,
14640        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14641    };
14642    #[cfg(feature = "arbitrary")]
14643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14644        use arbitrary::{Arbitrary, Unstructured};
14645        let mut buf = [0u8; 1024];
14646        rng.fill_bytes(&mut buf);
14647        let mut unstructured = Unstructured::new(&buf);
14648        Self::arbitrary(&mut unstructured).unwrap_or_default()
14649    }
14650}
14651impl Default for GPS_RTK_DATA {
14652    fn default() -> Self {
14653        Self::DEFAULT.clone()
14654    }
14655}
14656impl MessageData for GPS_RTK_DATA {
14657    type Message = MavMessage;
14658    const ID: u32 = 127u32;
14659    const NAME: &'static str = "GPS_RTK";
14660    const EXTRA_CRC: u8 = 25u8;
14661    const ENCODED_LEN: usize = 35usize;
14662    fn deser(
14663        _version: MavlinkVersion,
14664        __input: &[u8],
14665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14666        let avail_len = __input.len();
14667        let mut payload_buf = [0; Self::ENCODED_LEN];
14668        let mut buf = if avail_len < Self::ENCODED_LEN {
14669            payload_buf[0..avail_len].copy_from_slice(__input);
14670            Bytes::new(&payload_buf)
14671        } else {
14672            Bytes::new(__input)
14673        };
14674        let mut __struct = Self::default();
14675        __struct.time_last_baseline_ms = buf.get_u32_le()?;
14676        __struct.tow = buf.get_u32_le()?;
14677        __struct.baseline_a_mm = buf.get_i32_le()?;
14678        __struct.baseline_b_mm = buf.get_i32_le()?;
14679        __struct.baseline_c_mm = buf.get_i32_le()?;
14680        __struct.accuracy = buf.get_u32_le()?;
14681        __struct.iar_num_hypotheses = buf.get_i32_le()?;
14682        __struct.wn = buf.get_u16_le()?;
14683        __struct.rtk_receiver_id = buf.get_u8()?;
14684        __struct.rtk_health = buf.get_u8()?;
14685        __struct.rtk_rate = buf.get_u8()?;
14686        __struct.nsats = buf.get_u8()?;
14687        let tmp = buf.get_u8()?;
14688        __struct.baseline_coords_type =
14689            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14690                enum_type: "RtkBaselineCoordinateSystem",
14691                value: tmp as u64,
14692            })?;
14693        Ok(__struct)
14694    }
14695    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14696        let mut __tmp = BytesMut::new(bytes);
14697        #[allow(clippy::absurd_extreme_comparisons)]
14698        #[allow(unused_comparisons)]
14699        if __tmp.remaining() < Self::ENCODED_LEN {
14700            panic!(
14701                "buffer is too small (need {} bytes, but got {})",
14702                Self::ENCODED_LEN,
14703                __tmp.remaining(),
14704            )
14705        }
14706        __tmp.put_u32_le(self.time_last_baseline_ms);
14707        __tmp.put_u32_le(self.tow);
14708        __tmp.put_i32_le(self.baseline_a_mm);
14709        __tmp.put_i32_le(self.baseline_b_mm);
14710        __tmp.put_i32_le(self.baseline_c_mm);
14711        __tmp.put_u32_le(self.accuracy);
14712        __tmp.put_i32_le(self.iar_num_hypotheses);
14713        __tmp.put_u16_le(self.wn);
14714        __tmp.put_u8(self.rtk_receiver_id);
14715        __tmp.put_u8(self.rtk_health);
14716        __tmp.put_u8(self.rtk_rate);
14717        __tmp.put_u8(self.nsats);
14718        __tmp.put_u8(self.baseline_coords_type as u8);
14719        if matches!(version, MavlinkVersion::V2) {
14720            let len = __tmp.len();
14721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14722        } else {
14723            __tmp.len()
14724        }
14725    }
14726}
14727#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14728#[doc = ""]
14729#[doc = "ID: 25"]
14730#[derive(Debug, Clone, PartialEq)]
14731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14733#[cfg_attr(feature = "ts", derive(TS))]
14734#[cfg_attr(feature = "ts", ts(export))]
14735pub struct GPS_STATUS_DATA {
14736    #[doc = "Number of satellites visible"]
14737    pub satellites_visible: u8,
14738    #[doc = "Global satellite ID"]
14739    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14740    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14741    pub satellite_prn: [u8; 20],
14742    #[doc = "0: Satellite not used, 1: used for localization"]
14743    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14744    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14745    pub satellite_used: [u8; 20],
14746    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14747    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14748    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14749    pub satellite_elevation: [u8; 20],
14750    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14751    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14752    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14753    pub satellite_azimuth: [u8; 20],
14754    #[doc = "Signal to noise ratio of satellite"]
14755    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14756    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14757    pub satellite_snr: [u8; 20],
14758}
14759impl GPS_STATUS_DATA {
14760    pub const ENCODED_LEN: usize = 101usize;
14761    pub const DEFAULT: Self = Self {
14762        satellites_visible: 0_u8,
14763        satellite_prn: [0_u8; 20usize],
14764        satellite_used: [0_u8; 20usize],
14765        satellite_elevation: [0_u8; 20usize],
14766        satellite_azimuth: [0_u8; 20usize],
14767        satellite_snr: [0_u8; 20usize],
14768    };
14769    #[cfg(feature = "arbitrary")]
14770    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14771        use arbitrary::{Arbitrary, Unstructured};
14772        let mut buf = [0u8; 1024];
14773        rng.fill_bytes(&mut buf);
14774        let mut unstructured = Unstructured::new(&buf);
14775        Self::arbitrary(&mut unstructured).unwrap_or_default()
14776    }
14777}
14778impl Default for GPS_STATUS_DATA {
14779    fn default() -> Self {
14780        Self::DEFAULT.clone()
14781    }
14782}
14783impl MessageData for GPS_STATUS_DATA {
14784    type Message = MavMessage;
14785    const ID: u32 = 25u32;
14786    const NAME: &'static str = "GPS_STATUS";
14787    const EXTRA_CRC: u8 = 23u8;
14788    const ENCODED_LEN: usize = 101usize;
14789    fn deser(
14790        _version: MavlinkVersion,
14791        __input: &[u8],
14792    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14793        let avail_len = __input.len();
14794        let mut payload_buf = [0; Self::ENCODED_LEN];
14795        let mut buf = if avail_len < Self::ENCODED_LEN {
14796            payload_buf[0..avail_len].copy_from_slice(__input);
14797            Bytes::new(&payload_buf)
14798        } else {
14799            Bytes::new(__input)
14800        };
14801        let mut __struct = Self::default();
14802        __struct.satellites_visible = buf.get_u8()?;
14803        for v in &mut __struct.satellite_prn {
14804            let val = buf.get_u8()?;
14805            *v = val;
14806        }
14807        for v in &mut __struct.satellite_used {
14808            let val = buf.get_u8()?;
14809            *v = val;
14810        }
14811        for v in &mut __struct.satellite_elevation {
14812            let val = buf.get_u8()?;
14813            *v = val;
14814        }
14815        for v in &mut __struct.satellite_azimuth {
14816            let val = buf.get_u8()?;
14817            *v = val;
14818        }
14819        for v in &mut __struct.satellite_snr {
14820            let val = buf.get_u8()?;
14821            *v = val;
14822        }
14823        Ok(__struct)
14824    }
14825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14826        let mut __tmp = BytesMut::new(bytes);
14827        #[allow(clippy::absurd_extreme_comparisons)]
14828        #[allow(unused_comparisons)]
14829        if __tmp.remaining() < Self::ENCODED_LEN {
14830            panic!(
14831                "buffer is too small (need {} bytes, but got {})",
14832                Self::ENCODED_LEN,
14833                __tmp.remaining(),
14834            )
14835        }
14836        __tmp.put_u8(self.satellites_visible);
14837        for val in &self.satellite_prn {
14838            __tmp.put_u8(*val);
14839        }
14840        for val in &self.satellite_used {
14841            __tmp.put_u8(*val);
14842        }
14843        for val in &self.satellite_elevation {
14844            __tmp.put_u8(*val);
14845        }
14846        for val in &self.satellite_azimuth {
14847            __tmp.put_u8(*val);
14848        }
14849        for val in &self.satellite_snr {
14850            __tmp.put_u8(*val);
14851        }
14852        if matches!(version, MavlinkVersion::V2) {
14853            let len = __tmp.len();
14854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14855        } else {
14856            __tmp.len()
14857        }
14858    }
14859}
14860#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14861#[doc = ""]
14862#[doc = "ID: 0"]
14863#[derive(Debug, Clone, PartialEq)]
14864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14866#[cfg_attr(feature = "ts", derive(TS))]
14867#[cfg_attr(feature = "ts", ts(export))]
14868pub struct HEARTBEAT_DATA {
14869    #[doc = "A bitfield for use for autopilot-specific flags"]
14870    pub custom_mode: u32,
14871    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14872    pub mavtype: MavType,
14873    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14874    pub autopilot: MavAutopilot,
14875    #[doc = "System mode bitmap."]
14876    pub base_mode: MavModeFlag,
14877    #[doc = "System status flag."]
14878    pub system_status: MavState,
14879    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14880    pub mavlink_version: u8,
14881}
14882impl HEARTBEAT_DATA {
14883    pub const ENCODED_LEN: usize = 9usize;
14884    pub const DEFAULT: Self = Self {
14885        custom_mode: 0_u32,
14886        mavtype: MavType::DEFAULT,
14887        autopilot: MavAutopilot::DEFAULT,
14888        base_mode: MavModeFlag::DEFAULT,
14889        system_status: MavState::DEFAULT,
14890        mavlink_version: MINOR_MAVLINK_VERSION,
14891    };
14892    #[cfg(feature = "arbitrary")]
14893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14894        use arbitrary::{Arbitrary, Unstructured};
14895        let mut buf = [0u8; 1024];
14896        rng.fill_bytes(&mut buf);
14897        let mut unstructured = Unstructured::new(&buf);
14898        Self::arbitrary(&mut unstructured).unwrap_or_default()
14899    }
14900}
14901impl Default for HEARTBEAT_DATA {
14902    fn default() -> Self {
14903        Self::DEFAULT.clone()
14904    }
14905}
14906impl MessageData for HEARTBEAT_DATA {
14907    type Message = MavMessage;
14908    const ID: u32 = 0u32;
14909    const NAME: &'static str = "HEARTBEAT";
14910    const EXTRA_CRC: u8 = 50u8;
14911    const ENCODED_LEN: usize = 9usize;
14912    fn deser(
14913        _version: MavlinkVersion,
14914        __input: &[u8],
14915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14916        let avail_len = __input.len();
14917        let mut payload_buf = [0; Self::ENCODED_LEN];
14918        let mut buf = if avail_len < Self::ENCODED_LEN {
14919            payload_buf[0..avail_len].copy_from_slice(__input);
14920            Bytes::new(&payload_buf)
14921        } else {
14922            Bytes::new(__input)
14923        };
14924        let mut __struct = Self::default();
14925        __struct.custom_mode = buf.get_u32_le()?;
14926        let tmp = buf.get_u8()?;
14927        __struct.mavtype =
14928            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14929                enum_type: "MavType",
14930                value: tmp as u64,
14931            })?;
14932        let tmp = buf.get_u8()?;
14933        __struct.autopilot =
14934            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14935                enum_type: "MavAutopilot",
14936                value: tmp as u64,
14937            })?;
14938        let tmp = buf.get_u8()?;
14939        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
14940            ::mavlink_core::error::ParserError::InvalidFlag {
14941                flag_type: "MavModeFlag",
14942                value: tmp as u64,
14943            },
14944        )?;
14945        let tmp = buf.get_u8()?;
14946        __struct.system_status =
14947            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14948                enum_type: "MavState",
14949                value: tmp as u64,
14950            })?;
14951        __struct.mavlink_version = buf.get_u8()?;
14952        Ok(__struct)
14953    }
14954    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14955        let mut __tmp = BytesMut::new(bytes);
14956        #[allow(clippy::absurd_extreme_comparisons)]
14957        #[allow(unused_comparisons)]
14958        if __tmp.remaining() < Self::ENCODED_LEN {
14959            panic!(
14960                "buffer is too small (need {} bytes, but got {})",
14961                Self::ENCODED_LEN,
14962                __tmp.remaining(),
14963            )
14964        }
14965        __tmp.put_u32_le(self.custom_mode);
14966        __tmp.put_u8(self.mavtype as u8);
14967        __tmp.put_u8(self.autopilot as u8);
14968        __tmp.put_u8(self.base_mode.bits() as u8);
14969        __tmp.put_u8(self.system_status as u8);
14970        __tmp.put_u8(self.mavlink_version);
14971        if matches!(version, MavlinkVersion::V2) {
14972            let len = __tmp.len();
14973            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14974        } else {
14975            __tmp.len()
14976        }
14977    }
14978}
14979#[doc = "The IMU readings in SI units in NED body frame."]
14980#[doc = ""]
14981#[doc = "ID: 105"]
14982#[derive(Debug, Clone, PartialEq)]
14983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14985#[cfg_attr(feature = "ts", derive(TS))]
14986#[cfg_attr(feature = "ts", ts(export))]
14987pub struct HIGHRES_IMU_DATA {
14988    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14989    pub time_usec: u64,
14990    #[doc = "X acceleration"]
14991    pub xacc: f32,
14992    #[doc = "Y acceleration"]
14993    pub yacc: f32,
14994    #[doc = "Z acceleration"]
14995    pub zacc: f32,
14996    #[doc = "Angular speed around X axis"]
14997    pub xgyro: f32,
14998    #[doc = "Angular speed around Y axis"]
14999    pub ygyro: f32,
15000    #[doc = "Angular speed around Z axis"]
15001    pub zgyro: f32,
15002    #[doc = "X Magnetic field"]
15003    pub xmag: f32,
15004    #[doc = "Y Magnetic field"]
15005    pub ymag: f32,
15006    #[doc = "Z Magnetic field"]
15007    pub zmag: f32,
15008    #[doc = "Absolute pressure"]
15009    pub abs_pressure: f32,
15010    #[doc = "Differential pressure"]
15011    pub diff_pressure: f32,
15012    #[doc = "Altitude calculated from pressure"]
15013    pub pressure_alt: f32,
15014    #[doc = "Temperature"]
15015    pub temperature: f32,
15016    #[doc = "Bitmap for fields that have updated since last message"]
15017    pub fields_updated: HighresImuUpdatedFlags,
15018    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15019    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15020    pub id: u8,
15021}
15022impl HIGHRES_IMU_DATA {
15023    pub const ENCODED_LEN: usize = 63usize;
15024    pub const DEFAULT: Self = Self {
15025        time_usec: 0_u64,
15026        xacc: 0.0_f32,
15027        yacc: 0.0_f32,
15028        zacc: 0.0_f32,
15029        xgyro: 0.0_f32,
15030        ygyro: 0.0_f32,
15031        zgyro: 0.0_f32,
15032        xmag: 0.0_f32,
15033        ymag: 0.0_f32,
15034        zmag: 0.0_f32,
15035        abs_pressure: 0.0_f32,
15036        diff_pressure: 0.0_f32,
15037        pressure_alt: 0.0_f32,
15038        temperature: 0.0_f32,
15039        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15040        id: 0_u8,
15041    };
15042    #[cfg(feature = "arbitrary")]
15043    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15044        use arbitrary::{Arbitrary, Unstructured};
15045        let mut buf = [0u8; 1024];
15046        rng.fill_bytes(&mut buf);
15047        let mut unstructured = Unstructured::new(&buf);
15048        Self::arbitrary(&mut unstructured).unwrap_or_default()
15049    }
15050}
15051impl Default for HIGHRES_IMU_DATA {
15052    fn default() -> Self {
15053        Self::DEFAULT.clone()
15054    }
15055}
15056impl MessageData for HIGHRES_IMU_DATA {
15057    type Message = MavMessage;
15058    const ID: u32 = 105u32;
15059    const NAME: &'static str = "HIGHRES_IMU";
15060    const EXTRA_CRC: u8 = 93u8;
15061    const ENCODED_LEN: usize = 63usize;
15062    fn deser(
15063        _version: MavlinkVersion,
15064        __input: &[u8],
15065    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15066        let avail_len = __input.len();
15067        let mut payload_buf = [0; Self::ENCODED_LEN];
15068        let mut buf = if avail_len < Self::ENCODED_LEN {
15069            payload_buf[0..avail_len].copy_from_slice(__input);
15070            Bytes::new(&payload_buf)
15071        } else {
15072            Bytes::new(__input)
15073        };
15074        let mut __struct = Self::default();
15075        __struct.time_usec = buf.get_u64_le()?;
15076        __struct.xacc = buf.get_f32_le()?;
15077        __struct.yacc = buf.get_f32_le()?;
15078        __struct.zacc = buf.get_f32_le()?;
15079        __struct.xgyro = buf.get_f32_le()?;
15080        __struct.ygyro = buf.get_f32_le()?;
15081        __struct.zgyro = buf.get_f32_le()?;
15082        __struct.xmag = buf.get_f32_le()?;
15083        __struct.ymag = buf.get_f32_le()?;
15084        __struct.zmag = buf.get_f32_le()?;
15085        __struct.abs_pressure = buf.get_f32_le()?;
15086        __struct.diff_pressure = buf.get_f32_le()?;
15087        __struct.pressure_alt = buf.get_f32_le()?;
15088        __struct.temperature = buf.get_f32_le()?;
15089        let tmp = buf.get_u16_le()?;
15090        __struct.fields_updated =
15091            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
15092                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15093                    flag_type: "HighresImuUpdatedFlags",
15094                    value: tmp as u64,
15095                })?;
15096        __struct.id = buf.get_u8()?;
15097        Ok(__struct)
15098    }
15099    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15100        let mut __tmp = BytesMut::new(bytes);
15101        #[allow(clippy::absurd_extreme_comparisons)]
15102        #[allow(unused_comparisons)]
15103        if __tmp.remaining() < Self::ENCODED_LEN {
15104            panic!(
15105                "buffer is too small (need {} bytes, but got {})",
15106                Self::ENCODED_LEN,
15107                __tmp.remaining(),
15108            )
15109        }
15110        __tmp.put_u64_le(self.time_usec);
15111        __tmp.put_f32_le(self.xacc);
15112        __tmp.put_f32_le(self.yacc);
15113        __tmp.put_f32_le(self.zacc);
15114        __tmp.put_f32_le(self.xgyro);
15115        __tmp.put_f32_le(self.ygyro);
15116        __tmp.put_f32_le(self.zgyro);
15117        __tmp.put_f32_le(self.xmag);
15118        __tmp.put_f32_le(self.ymag);
15119        __tmp.put_f32_le(self.zmag);
15120        __tmp.put_f32_le(self.abs_pressure);
15121        __tmp.put_f32_le(self.diff_pressure);
15122        __tmp.put_f32_le(self.pressure_alt);
15123        __tmp.put_f32_le(self.temperature);
15124        __tmp.put_u16_le(self.fields_updated.bits() as u16);
15125        if matches!(version, MavlinkVersion::V2) {
15126            __tmp.put_u8(self.id);
15127            let len = __tmp.len();
15128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15129        } else {
15130            __tmp.len()
15131        }
15132    }
15133}
15134#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15135#[doc = "Message appropriate for high latency connections like Iridium."]
15136#[doc = ""]
15137#[doc = "ID: 234"]
15138#[derive(Debug, Clone, PartialEq)]
15139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15141#[cfg_attr(feature = "ts", derive(TS))]
15142#[cfg_attr(feature = "ts", ts(export))]
15143pub struct HIGH_LATENCY_DATA {
15144    #[doc = "A bitfield for use for autopilot-specific flags."]
15145    pub custom_mode: u32,
15146    #[doc = "Latitude"]
15147    pub latitude: i32,
15148    #[doc = "Longitude"]
15149    pub longitude: i32,
15150    #[doc = "roll"]
15151    pub roll: i16,
15152    #[doc = "pitch"]
15153    pub pitch: i16,
15154    #[doc = "heading"]
15155    pub heading: u16,
15156    #[doc = "heading setpoint"]
15157    pub heading_sp: i16,
15158    #[doc = "Altitude above mean sea level"]
15159    pub altitude_amsl: i16,
15160    #[doc = "Altitude setpoint relative to the home position"]
15161    pub altitude_sp: i16,
15162    #[doc = "distance to target"]
15163    pub wp_distance: u16,
15164    #[doc = "Bitmap of enabled system modes."]
15165    pub base_mode: MavModeFlag,
15166    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15167    pub landed_state: MavLandedState,
15168    #[doc = "throttle (percentage)"]
15169    pub throttle: i8,
15170    #[doc = "airspeed"]
15171    pub airspeed: u8,
15172    #[doc = "airspeed setpoint"]
15173    pub airspeed_sp: u8,
15174    #[doc = "groundspeed"]
15175    pub groundspeed: u8,
15176    #[doc = "climb rate"]
15177    pub climb_rate: i8,
15178    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15179    pub gps_nsat: u8,
15180    #[doc = "GPS Fix type."]
15181    pub gps_fix_type: GpsFixType,
15182    #[doc = "Remaining battery (percentage)"]
15183    pub battery_remaining: u8,
15184    #[doc = "Autopilot temperature (degrees C)"]
15185    pub temperature: i8,
15186    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15187    pub temperature_air: i8,
15188    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15189    pub failsafe: u8,
15190    #[doc = "current waypoint number"]
15191    pub wp_num: u8,
15192}
15193impl HIGH_LATENCY_DATA {
15194    pub const ENCODED_LEN: usize = 40usize;
15195    pub const DEFAULT: Self = Self {
15196        custom_mode: 0_u32,
15197        latitude: 0_i32,
15198        longitude: 0_i32,
15199        roll: 0_i16,
15200        pitch: 0_i16,
15201        heading: 0_u16,
15202        heading_sp: 0_i16,
15203        altitude_amsl: 0_i16,
15204        altitude_sp: 0_i16,
15205        wp_distance: 0_u16,
15206        base_mode: MavModeFlag::DEFAULT,
15207        landed_state: MavLandedState::DEFAULT,
15208        throttle: 0_i8,
15209        airspeed: 0_u8,
15210        airspeed_sp: 0_u8,
15211        groundspeed: 0_u8,
15212        climb_rate: 0_i8,
15213        gps_nsat: 0_u8,
15214        gps_fix_type: GpsFixType::DEFAULT,
15215        battery_remaining: 0_u8,
15216        temperature: 0_i8,
15217        temperature_air: 0_i8,
15218        failsafe: 0_u8,
15219        wp_num: 0_u8,
15220    };
15221    #[cfg(feature = "arbitrary")]
15222    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15223        use arbitrary::{Arbitrary, Unstructured};
15224        let mut buf = [0u8; 1024];
15225        rng.fill_bytes(&mut buf);
15226        let mut unstructured = Unstructured::new(&buf);
15227        Self::arbitrary(&mut unstructured).unwrap_or_default()
15228    }
15229}
15230impl Default for HIGH_LATENCY_DATA {
15231    fn default() -> Self {
15232        Self::DEFAULT.clone()
15233    }
15234}
15235impl MessageData for HIGH_LATENCY_DATA {
15236    type Message = MavMessage;
15237    const ID: u32 = 234u32;
15238    const NAME: &'static str = "HIGH_LATENCY";
15239    const EXTRA_CRC: u8 = 150u8;
15240    const ENCODED_LEN: usize = 40usize;
15241    fn deser(
15242        _version: MavlinkVersion,
15243        __input: &[u8],
15244    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15245        let avail_len = __input.len();
15246        let mut payload_buf = [0; Self::ENCODED_LEN];
15247        let mut buf = if avail_len < Self::ENCODED_LEN {
15248            payload_buf[0..avail_len].copy_from_slice(__input);
15249            Bytes::new(&payload_buf)
15250        } else {
15251            Bytes::new(__input)
15252        };
15253        let mut __struct = Self::default();
15254        __struct.custom_mode = buf.get_u32_le()?;
15255        __struct.latitude = buf.get_i32_le()?;
15256        __struct.longitude = buf.get_i32_le()?;
15257        __struct.roll = buf.get_i16_le()?;
15258        __struct.pitch = buf.get_i16_le()?;
15259        __struct.heading = buf.get_u16_le()?;
15260        __struct.heading_sp = buf.get_i16_le()?;
15261        __struct.altitude_amsl = buf.get_i16_le()?;
15262        __struct.altitude_sp = buf.get_i16_le()?;
15263        __struct.wp_distance = buf.get_u16_le()?;
15264        let tmp = buf.get_u8()?;
15265        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15266            ::mavlink_core::error::ParserError::InvalidFlag {
15267                flag_type: "MavModeFlag",
15268                value: tmp as u64,
15269            },
15270        )?;
15271        let tmp = buf.get_u8()?;
15272        __struct.landed_state =
15273            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15274                enum_type: "MavLandedState",
15275                value: tmp as u64,
15276            })?;
15277        __struct.throttle = buf.get_i8()?;
15278        __struct.airspeed = buf.get_u8()?;
15279        __struct.airspeed_sp = buf.get_u8()?;
15280        __struct.groundspeed = buf.get_u8()?;
15281        __struct.climb_rate = buf.get_i8()?;
15282        __struct.gps_nsat = buf.get_u8()?;
15283        let tmp = buf.get_u8()?;
15284        __struct.gps_fix_type =
15285            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15286                enum_type: "GpsFixType",
15287                value: tmp as u64,
15288            })?;
15289        __struct.battery_remaining = buf.get_u8()?;
15290        __struct.temperature = buf.get_i8()?;
15291        __struct.temperature_air = buf.get_i8()?;
15292        __struct.failsafe = buf.get_u8()?;
15293        __struct.wp_num = buf.get_u8()?;
15294        Ok(__struct)
15295    }
15296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15297        let mut __tmp = BytesMut::new(bytes);
15298        #[allow(clippy::absurd_extreme_comparisons)]
15299        #[allow(unused_comparisons)]
15300        if __tmp.remaining() < Self::ENCODED_LEN {
15301            panic!(
15302                "buffer is too small (need {} bytes, but got {})",
15303                Self::ENCODED_LEN,
15304                __tmp.remaining(),
15305            )
15306        }
15307        __tmp.put_u32_le(self.custom_mode);
15308        __tmp.put_i32_le(self.latitude);
15309        __tmp.put_i32_le(self.longitude);
15310        __tmp.put_i16_le(self.roll);
15311        __tmp.put_i16_le(self.pitch);
15312        __tmp.put_u16_le(self.heading);
15313        __tmp.put_i16_le(self.heading_sp);
15314        __tmp.put_i16_le(self.altitude_amsl);
15315        __tmp.put_i16_le(self.altitude_sp);
15316        __tmp.put_u16_le(self.wp_distance);
15317        __tmp.put_u8(self.base_mode.bits() as u8);
15318        __tmp.put_u8(self.landed_state as u8);
15319        __tmp.put_i8(self.throttle);
15320        __tmp.put_u8(self.airspeed);
15321        __tmp.put_u8(self.airspeed_sp);
15322        __tmp.put_u8(self.groundspeed);
15323        __tmp.put_i8(self.climb_rate);
15324        __tmp.put_u8(self.gps_nsat);
15325        __tmp.put_u8(self.gps_fix_type as u8);
15326        __tmp.put_u8(self.battery_remaining);
15327        __tmp.put_i8(self.temperature);
15328        __tmp.put_i8(self.temperature_air);
15329        __tmp.put_u8(self.failsafe);
15330        __tmp.put_u8(self.wp_num);
15331        if matches!(version, MavlinkVersion::V2) {
15332            let len = __tmp.len();
15333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15334        } else {
15335            __tmp.len()
15336        }
15337    }
15338}
15339#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15340#[doc = ""]
15341#[doc = "ID: 235"]
15342#[derive(Debug, Clone, PartialEq)]
15343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15345#[cfg_attr(feature = "ts", derive(TS))]
15346#[cfg_attr(feature = "ts", ts(export))]
15347pub struct HIGH_LATENCY2_DATA {
15348    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15349    pub timestamp: u32,
15350    #[doc = "Latitude"]
15351    pub latitude: i32,
15352    #[doc = "Longitude"]
15353    pub longitude: i32,
15354    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15355    pub custom_mode: u16,
15356    #[doc = "Altitude above mean sea level"]
15357    pub altitude: i16,
15358    #[doc = "Altitude setpoint"]
15359    pub target_altitude: i16,
15360    #[doc = "Distance to target waypoint or position"]
15361    pub target_distance: u16,
15362    #[doc = "Current waypoint number"]
15363    pub wp_num: u16,
15364    #[doc = "Bitmap of failure flags."]
15365    pub failure_flags: HlFailureFlag,
15366    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15367    pub mavtype: MavType,
15368    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15369    pub autopilot: MavAutopilot,
15370    #[doc = "Heading"]
15371    pub heading: u8,
15372    #[doc = "Heading setpoint"]
15373    pub target_heading: u8,
15374    #[doc = "Throttle"]
15375    pub throttle: u8,
15376    #[doc = "Airspeed"]
15377    pub airspeed: u8,
15378    #[doc = "Airspeed setpoint"]
15379    pub airspeed_sp: u8,
15380    #[doc = "Groundspeed"]
15381    pub groundspeed: u8,
15382    #[doc = "Windspeed"]
15383    pub windspeed: u8,
15384    #[doc = "Wind heading"]
15385    pub wind_heading: u8,
15386    #[doc = "Maximum error horizontal position since last message"]
15387    pub eph: u8,
15388    #[doc = "Maximum error vertical position since last message"]
15389    pub epv: u8,
15390    #[doc = "Air temperature"]
15391    pub temperature_air: i8,
15392    #[doc = "Maximum climb rate magnitude since last message"]
15393    pub climb_rate: i8,
15394    #[doc = "Battery level (-1 if field not provided)."]
15395    pub battery: i8,
15396    #[doc = "Field for custom payload."]
15397    pub custom0: i8,
15398    #[doc = "Field for custom payload."]
15399    pub custom1: i8,
15400    #[doc = "Field for custom payload."]
15401    pub custom2: i8,
15402}
15403impl HIGH_LATENCY2_DATA {
15404    pub const ENCODED_LEN: usize = 42usize;
15405    pub const DEFAULT: Self = Self {
15406        timestamp: 0_u32,
15407        latitude: 0_i32,
15408        longitude: 0_i32,
15409        custom_mode: 0_u16,
15410        altitude: 0_i16,
15411        target_altitude: 0_i16,
15412        target_distance: 0_u16,
15413        wp_num: 0_u16,
15414        failure_flags: HlFailureFlag::DEFAULT,
15415        mavtype: MavType::DEFAULT,
15416        autopilot: MavAutopilot::DEFAULT,
15417        heading: 0_u8,
15418        target_heading: 0_u8,
15419        throttle: 0_u8,
15420        airspeed: 0_u8,
15421        airspeed_sp: 0_u8,
15422        groundspeed: 0_u8,
15423        windspeed: 0_u8,
15424        wind_heading: 0_u8,
15425        eph: 0_u8,
15426        epv: 0_u8,
15427        temperature_air: 0_i8,
15428        climb_rate: 0_i8,
15429        battery: 0_i8,
15430        custom0: 0_i8,
15431        custom1: 0_i8,
15432        custom2: 0_i8,
15433    };
15434    #[cfg(feature = "arbitrary")]
15435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15436        use arbitrary::{Arbitrary, Unstructured};
15437        let mut buf = [0u8; 1024];
15438        rng.fill_bytes(&mut buf);
15439        let mut unstructured = Unstructured::new(&buf);
15440        Self::arbitrary(&mut unstructured).unwrap_or_default()
15441    }
15442}
15443impl Default for HIGH_LATENCY2_DATA {
15444    fn default() -> Self {
15445        Self::DEFAULT.clone()
15446    }
15447}
15448impl MessageData for HIGH_LATENCY2_DATA {
15449    type Message = MavMessage;
15450    const ID: u32 = 235u32;
15451    const NAME: &'static str = "HIGH_LATENCY2";
15452    const EXTRA_CRC: u8 = 179u8;
15453    const ENCODED_LEN: usize = 42usize;
15454    fn deser(
15455        _version: MavlinkVersion,
15456        __input: &[u8],
15457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15458        let avail_len = __input.len();
15459        let mut payload_buf = [0; Self::ENCODED_LEN];
15460        let mut buf = if avail_len < Self::ENCODED_LEN {
15461            payload_buf[0..avail_len].copy_from_slice(__input);
15462            Bytes::new(&payload_buf)
15463        } else {
15464            Bytes::new(__input)
15465        };
15466        let mut __struct = Self::default();
15467        __struct.timestamp = buf.get_u32_le()?;
15468        __struct.latitude = buf.get_i32_le()?;
15469        __struct.longitude = buf.get_i32_le()?;
15470        __struct.custom_mode = buf.get_u16_le()?;
15471        __struct.altitude = buf.get_i16_le()?;
15472        __struct.target_altitude = buf.get_i16_le()?;
15473        __struct.target_distance = buf.get_u16_le()?;
15474        __struct.wp_num = buf.get_u16_le()?;
15475        let tmp = buf.get_u16_le()?;
15476        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
15477            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15478                flag_type: "HlFailureFlag",
15479                value: tmp as u64,
15480            })?;
15481        let tmp = buf.get_u8()?;
15482        __struct.mavtype =
15483            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15484                enum_type: "MavType",
15485                value: tmp as u64,
15486            })?;
15487        let tmp = buf.get_u8()?;
15488        __struct.autopilot =
15489            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15490                enum_type: "MavAutopilot",
15491                value: tmp as u64,
15492            })?;
15493        __struct.heading = buf.get_u8()?;
15494        __struct.target_heading = buf.get_u8()?;
15495        __struct.throttle = buf.get_u8()?;
15496        __struct.airspeed = buf.get_u8()?;
15497        __struct.airspeed_sp = buf.get_u8()?;
15498        __struct.groundspeed = buf.get_u8()?;
15499        __struct.windspeed = buf.get_u8()?;
15500        __struct.wind_heading = buf.get_u8()?;
15501        __struct.eph = buf.get_u8()?;
15502        __struct.epv = buf.get_u8()?;
15503        __struct.temperature_air = buf.get_i8()?;
15504        __struct.climb_rate = buf.get_i8()?;
15505        __struct.battery = buf.get_i8()?;
15506        __struct.custom0 = buf.get_i8()?;
15507        __struct.custom1 = buf.get_i8()?;
15508        __struct.custom2 = buf.get_i8()?;
15509        Ok(__struct)
15510    }
15511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15512        let mut __tmp = BytesMut::new(bytes);
15513        #[allow(clippy::absurd_extreme_comparisons)]
15514        #[allow(unused_comparisons)]
15515        if __tmp.remaining() < Self::ENCODED_LEN {
15516            panic!(
15517                "buffer is too small (need {} bytes, but got {})",
15518                Self::ENCODED_LEN,
15519                __tmp.remaining(),
15520            )
15521        }
15522        __tmp.put_u32_le(self.timestamp);
15523        __tmp.put_i32_le(self.latitude);
15524        __tmp.put_i32_le(self.longitude);
15525        __tmp.put_u16_le(self.custom_mode);
15526        __tmp.put_i16_le(self.altitude);
15527        __tmp.put_i16_le(self.target_altitude);
15528        __tmp.put_u16_le(self.target_distance);
15529        __tmp.put_u16_le(self.wp_num);
15530        __tmp.put_u16_le(self.failure_flags.bits() as u16);
15531        __tmp.put_u8(self.mavtype as u8);
15532        __tmp.put_u8(self.autopilot as u8);
15533        __tmp.put_u8(self.heading);
15534        __tmp.put_u8(self.target_heading);
15535        __tmp.put_u8(self.throttle);
15536        __tmp.put_u8(self.airspeed);
15537        __tmp.put_u8(self.airspeed_sp);
15538        __tmp.put_u8(self.groundspeed);
15539        __tmp.put_u8(self.windspeed);
15540        __tmp.put_u8(self.wind_heading);
15541        __tmp.put_u8(self.eph);
15542        __tmp.put_u8(self.epv);
15543        __tmp.put_i8(self.temperature_air);
15544        __tmp.put_i8(self.climb_rate);
15545        __tmp.put_i8(self.battery);
15546        __tmp.put_i8(self.custom0);
15547        __tmp.put_i8(self.custom1);
15548        __tmp.put_i8(self.custom2);
15549        if matches!(version, MavlinkVersion::V2) {
15550            let len = __tmp.len();
15551            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15552        } else {
15553            __tmp.len()
15554        }
15555    }
15556}
15557#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15558#[doc = ""]
15559#[doc = "ID: 93"]
15560#[derive(Debug, Clone, PartialEq)]
15561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15563#[cfg_attr(feature = "ts", derive(TS))]
15564#[cfg_attr(feature = "ts", ts(export))]
15565pub struct HIL_ACTUATOR_CONTROLS_DATA {
15566    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15567    pub time_usec: u64,
15568    #[doc = "Flags bitmask."]
15569    pub flags: HilActuatorControlsFlags,
15570    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15571    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15572    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15573    pub controls: [f32; 16],
15574    #[doc = "System mode. Includes arming state."]
15575    pub mode: MavModeFlag,
15576}
15577impl HIL_ACTUATOR_CONTROLS_DATA {
15578    pub const ENCODED_LEN: usize = 81usize;
15579    pub const DEFAULT: Self = Self {
15580        time_usec: 0_u64,
15581        flags: HilActuatorControlsFlags::DEFAULT,
15582        controls: [0.0_f32; 16usize],
15583        mode: MavModeFlag::DEFAULT,
15584    };
15585    #[cfg(feature = "arbitrary")]
15586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15587        use arbitrary::{Arbitrary, Unstructured};
15588        let mut buf = [0u8; 1024];
15589        rng.fill_bytes(&mut buf);
15590        let mut unstructured = Unstructured::new(&buf);
15591        Self::arbitrary(&mut unstructured).unwrap_or_default()
15592    }
15593}
15594impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15595    fn default() -> Self {
15596        Self::DEFAULT.clone()
15597    }
15598}
15599impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15600    type Message = MavMessage;
15601    const ID: u32 = 93u32;
15602    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15603    const EXTRA_CRC: u8 = 47u8;
15604    const ENCODED_LEN: usize = 81usize;
15605    fn deser(
15606        _version: MavlinkVersion,
15607        __input: &[u8],
15608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15609        let avail_len = __input.len();
15610        let mut payload_buf = [0; Self::ENCODED_LEN];
15611        let mut buf = if avail_len < Self::ENCODED_LEN {
15612            payload_buf[0..avail_len].copy_from_slice(__input);
15613            Bytes::new(&payload_buf)
15614        } else {
15615            Bytes::new(__input)
15616        };
15617        let mut __struct = Self::default();
15618        __struct.time_usec = buf.get_u64_le()?;
15619        let tmp = buf.get_u64_le()?;
15620        __struct.flags =
15621            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
15622                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15623                flag_type: "HilActuatorControlsFlags",
15624                value: tmp as u64,
15625            })?;
15626        for v in &mut __struct.controls {
15627            let val = buf.get_f32_le()?;
15628            *v = val;
15629        }
15630        let tmp = buf.get_u8()?;
15631        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15632            ::mavlink_core::error::ParserError::InvalidFlag {
15633                flag_type: "MavModeFlag",
15634                value: tmp as u64,
15635            },
15636        )?;
15637        Ok(__struct)
15638    }
15639    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15640        let mut __tmp = BytesMut::new(bytes);
15641        #[allow(clippy::absurd_extreme_comparisons)]
15642        #[allow(unused_comparisons)]
15643        if __tmp.remaining() < Self::ENCODED_LEN {
15644            panic!(
15645                "buffer is too small (need {} bytes, but got {})",
15646                Self::ENCODED_LEN,
15647                __tmp.remaining(),
15648            )
15649        }
15650        __tmp.put_u64_le(self.time_usec);
15651        __tmp.put_u64_le(self.flags.bits() as u64);
15652        for val in &self.controls {
15653            __tmp.put_f32_le(*val);
15654        }
15655        __tmp.put_u8(self.mode.bits() as u8);
15656        if matches!(version, MavlinkVersion::V2) {
15657            let len = __tmp.len();
15658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15659        } else {
15660            __tmp.len()
15661        }
15662    }
15663}
15664#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15665#[doc = ""]
15666#[doc = "ID: 91"]
15667#[derive(Debug, Clone, PartialEq)]
15668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15670#[cfg_attr(feature = "ts", derive(TS))]
15671#[cfg_attr(feature = "ts", ts(export))]
15672pub struct HIL_CONTROLS_DATA {
15673    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15674    pub time_usec: u64,
15675    #[doc = "Control output -1 .. 1"]
15676    pub roll_ailerons: f32,
15677    #[doc = "Control output -1 .. 1"]
15678    pub pitch_elevator: f32,
15679    #[doc = "Control output -1 .. 1"]
15680    pub yaw_rudder: f32,
15681    #[doc = "Throttle 0 .. 1"]
15682    pub throttle: f32,
15683    #[doc = "Aux 1, -1 .. 1"]
15684    pub aux1: f32,
15685    #[doc = "Aux 2, -1 .. 1"]
15686    pub aux2: f32,
15687    #[doc = "Aux 3, -1 .. 1"]
15688    pub aux3: f32,
15689    #[doc = "Aux 4, -1 .. 1"]
15690    pub aux4: f32,
15691    #[doc = "System mode."]
15692    pub mode: MavMode,
15693    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15694    pub nav_mode: u8,
15695}
15696impl HIL_CONTROLS_DATA {
15697    pub const ENCODED_LEN: usize = 42usize;
15698    pub const DEFAULT: Self = Self {
15699        time_usec: 0_u64,
15700        roll_ailerons: 0.0_f32,
15701        pitch_elevator: 0.0_f32,
15702        yaw_rudder: 0.0_f32,
15703        throttle: 0.0_f32,
15704        aux1: 0.0_f32,
15705        aux2: 0.0_f32,
15706        aux3: 0.0_f32,
15707        aux4: 0.0_f32,
15708        mode: MavMode::DEFAULT,
15709        nav_mode: 0_u8,
15710    };
15711    #[cfg(feature = "arbitrary")]
15712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15713        use arbitrary::{Arbitrary, Unstructured};
15714        let mut buf = [0u8; 1024];
15715        rng.fill_bytes(&mut buf);
15716        let mut unstructured = Unstructured::new(&buf);
15717        Self::arbitrary(&mut unstructured).unwrap_or_default()
15718    }
15719}
15720impl Default for HIL_CONTROLS_DATA {
15721    fn default() -> Self {
15722        Self::DEFAULT.clone()
15723    }
15724}
15725impl MessageData for HIL_CONTROLS_DATA {
15726    type Message = MavMessage;
15727    const ID: u32 = 91u32;
15728    const NAME: &'static str = "HIL_CONTROLS";
15729    const EXTRA_CRC: u8 = 63u8;
15730    const ENCODED_LEN: usize = 42usize;
15731    fn deser(
15732        _version: MavlinkVersion,
15733        __input: &[u8],
15734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15735        let avail_len = __input.len();
15736        let mut payload_buf = [0; Self::ENCODED_LEN];
15737        let mut buf = if avail_len < Self::ENCODED_LEN {
15738            payload_buf[0..avail_len].copy_from_slice(__input);
15739            Bytes::new(&payload_buf)
15740        } else {
15741            Bytes::new(__input)
15742        };
15743        let mut __struct = Self::default();
15744        __struct.time_usec = buf.get_u64_le()?;
15745        __struct.roll_ailerons = buf.get_f32_le()?;
15746        __struct.pitch_elevator = buf.get_f32_le()?;
15747        __struct.yaw_rudder = buf.get_f32_le()?;
15748        __struct.throttle = buf.get_f32_le()?;
15749        __struct.aux1 = buf.get_f32_le()?;
15750        __struct.aux2 = buf.get_f32_le()?;
15751        __struct.aux3 = buf.get_f32_le()?;
15752        __struct.aux4 = buf.get_f32_le()?;
15753        let tmp = buf.get_u8()?;
15754        __struct.mode =
15755            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15756                enum_type: "MavMode",
15757                value: tmp as u64,
15758            })?;
15759        __struct.nav_mode = buf.get_u8()?;
15760        Ok(__struct)
15761    }
15762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15763        let mut __tmp = BytesMut::new(bytes);
15764        #[allow(clippy::absurd_extreme_comparisons)]
15765        #[allow(unused_comparisons)]
15766        if __tmp.remaining() < Self::ENCODED_LEN {
15767            panic!(
15768                "buffer is too small (need {} bytes, but got {})",
15769                Self::ENCODED_LEN,
15770                __tmp.remaining(),
15771            )
15772        }
15773        __tmp.put_u64_le(self.time_usec);
15774        __tmp.put_f32_le(self.roll_ailerons);
15775        __tmp.put_f32_le(self.pitch_elevator);
15776        __tmp.put_f32_le(self.yaw_rudder);
15777        __tmp.put_f32_le(self.throttle);
15778        __tmp.put_f32_le(self.aux1);
15779        __tmp.put_f32_le(self.aux2);
15780        __tmp.put_f32_le(self.aux3);
15781        __tmp.put_f32_le(self.aux4);
15782        __tmp.put_u8(self.mode as u8);
15783        __tmp.put_u8(self.nav_mode);
15784        if matches!(version, MavlinkVersion::V2) {
15785            let len = __tmp.len();
15786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15787        } else {
15788            __tmp.len()
15789        }
15790    }
15791}
15792#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15793#[doc = ""]
15794#[doc = "ID: 113"]
15795#[derive(Debug, Clone, PartialEq)]
15796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15798#[cfg_attr(feature = "ts", derive(TS))]
15799#[cfg_attr(feature = "ts", ts(export))]
15800pub struct HIL_GPS_DATA {
15801    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15802    pub time_usec: u64,
15803    #[doc = "Latitude (WGS84)"]
15804    pub lat: i32,
15805    #[doc = "Longitude (WGS84)"]
15806    pub lon: i32,
15807    #[doc = "Altitude (MSL). Positive for up."]
15808    pub alt: i32,
15809    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15810    pub eph: u16,
15811    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15812    pub epv: u16,
15813    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15814    pub vel: u16,
15815    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15816    pub vn: i16,
15817    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15818    pub ve: i16,
15819    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15820    pub vd: i16,
15821    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15822    pub cog: u16,
15823    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15824    pub fix_type: u8,
15825    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15826    pub satellites_visible: u8,
15827    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15828    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15829    pub id: u8,
15830    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15831    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15832    pub yaw: u16,
15833}
15834impl HIL_GPS_DATA {
15835    pub const ENCODED_LEN: usize = 39usize;
15836    pub const DEFAULT: Self = Self {
15837        time_usec: 0_u64,
15838        lat: 0_i32,
15839        lon: 0_i32,
15840        alt: 0_i32,
15841        eph: 0_u16,
15842        epv: 0_u16,
15843        vel: 0_u16,
15844        vn: 0_i16,
15845        ve: 0_i16,
15846        vd: 0_i16,
15847        cog: 0_u16,
15848        fix_type: 0_u8,
15849        satellites_visible: 0_u8,
15850        id: 0_u8,
15851        yaw: 0_u16,
15852    };
15853    #[cfg(feature = "arbitrary")]
15854    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15855        use arbitrary::{Arbitrary, Unstructured};
15856        let mut buf = [0u8; 1024];
15857        rng.fill_bytes(&mut buf);
15858        let mut unstructured = Unstructured::new(&buf);
15859        Self::arbitrary(&mut unstructured).unwrap_or_default()
15860    }
15861}
15862impl Default for HIL_GPS_DATA {
15863    fn default() -> Self {
15864        Self::DEFAULT.clone()
15865    }
15866}
15867impl MessageData for HIL_GPS_DATA {
15868    type Message = MavMessage;
15869    const ID: u32 = 113u32;
15870    const NAME: &'static str = "HIL_GPS";
15871    const EXTRA_CRC: u8 = 124u8;
15872    const ENCODED_LEN: usize = 39usize;
15873    fn deser(
15874        _version: MavlinkVersion,
15875        __input: &[u8],
15876    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15877        let avail_len = __input.len();
15878        let mut payload_buf = [0; Self::ENCODED_LEN];
15879        let mut buf = if avail_len < Self::ENCODED_LEN {
15880            payload_buf[0..avail_len].copy_from_slice(__input);
15881            Bytes::new(&payload_buf)
15882        } else {
15883            Bytes::new(__input)
15884        };
15885        let mut __struct = Self::default();
15886        __struct.time_usec = buf.get_u64_le()?;
15887        __struct.lat = buf.get_i32_le()?;
15888        __struct.lon = buf.get_i32_le()?;
15889        __struct.alt = buf.get_i32_le()?;
15890        __struct.eph = buf.get_u16_le()?;
15891        __struct.epv = buf.get_u16_le()?;
15892        __struct.vel = buf.get_u16_le()?;
15893        __struct.vn = buf.get_i16_le()?;
15894        __struct.ve = buf.get_i16_le()?;
15895        __struct.vd = buf.get_i16_le()?;
15896        __struct.cog = buf.get_u16_le()?;
15897        __struct.fix_type = buf.get_u8()?;
15898        __struct.satellites_visible = buf.get_u8()?;
15899        __struct.id = buf.get_u8()?;
15900        __struct.yaw = buf.get_u16_le()?;
15901        Ok(__struct)
15902    }
15903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15904        let mut __tmp = BytesMut::new(bytes);
15905        #[allow(clippy::absurd_extreme_comparisons)]
15906        #[allow(unused_comparisons)]
15907        if __tmp.remaining() < Self::ENCODED_LEN {
15908            panic!(
15909                "buffer is too small (need {} bytes, but got {})",
15910                Self::ENCODED_LEN,
15911                __tmp.remaining(),
15912            )
15913        }
15914        __tmp.put_u64_le(self.time_usec);
15915        __tmp.put_i32_le(self.lat);
15916        __tmp.put_i32_le(self.lon);
15917        __tmp.put_i32_le(self.alt);
15918        __tmp.put_u16_le(self.eph);
15919        __tmp.put_u16_le(self.epv);
15920        __tmp.put_u16_le(self.vel);
15921        __tmp.put_i16_le(self.vn);
15922        __tmp.put_i16_le(self.ve);
15923        __tmp.put_i16_le(self.vd);
15924        __tmp.put_u16_le(self.cog);
15925        __tmp.put_u8(self.fix_type);
15926        __tmp.put_u8(self.satellites_visible);
15927        if matches!(version, MavlinkVersion::V2) {
15928            __tmp.put_u8(self.id);
15929            __tmp.put_u16_le(self.yaw);
15930            let len = __tmp.len();
15931            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15932        } else {
15933            __tmp.len()
15934        }
15935    }
15936}
15937#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15938#[doc = ""]
15939#[doc = "ID: 114"]
15940#[derive(Debug, Clone, PartialEq)]
15941#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15942#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15943#[cfg_attr(feature = "ts", derive(TS))]
15944#[cfg_attr(feature = "ts", ts(export))]
15945pub struct HIL_OPTICAL_FLOW_DATA {
15946    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15947    pub time_usec: u64,
15948    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15949    pub integration_time_us: u32,
15950    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15951    pub integrated_x: f32,
15952    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15953    pub integrated_y: f32,
15954    #[doc = "RH rotation around X axis"]
15955    pub integrated_xgyro: f32,
15956    #[doc = "RH rotation around Y axis"]
15957    pub integrated_ygyro: f32,
15958    #[doc = "RH rotation around Z axis"]
15959    pub integrated_zgyro: f32,
15960    #[doc = "Time since the distance was sampled."]
15961    pub time_delta_distance_us: u32,
15962    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15963    pub distance: f32,
15964    #[doc = "Temperature"]
15965    pub temperature: i16,
15966    #[doc = "Sensor ID"]
15967    pub sensor_id: u8,
15968    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15969    pub quality: u8,
15970}
15971impl HIL_OPTICAL_FLOW_DATA {
15972    pub const ENCODED_LEN: usize = 44usize;
15973    pub const DEFAULT: Self = Self {
15974        time_usec: 0_u64,
15975        integration_time_us: 0_u32,
15976        integrated_x: 0.0_f32,
15977        integrated_y: 0.0_f32,
15978        integrated_xgyro: 0.0_f32,
15979        integrated_ygyro: 0.0_f32,
15980        integrated_zgyro: 0.0_f32,
15981        time_delta_distance_us: 0_u32,
15982        distance: 0.0_f32,
15983        temperature: 0_i16,
15984        sensor_id: 0_u8,
15985        quality: 0_u8,
15986    };
15987    #[cfg(feature = "arbitrary")]
15988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15989        use arbitrary::{Arbitrary, Unstructured};
15990        let mut buf = [0u8; 1024];
15991        rng.fill_bytes(&mut buf);
15992        let mut unstructured = Unstructured::new(&buf);
15993        Self::arbitrary(&mut unstructured).unwrap_or_default()
15994    }
15995}
15996impl Default for HIL_OPTICAL_FLOW_DATA {
15997    fn default() -> Self {
15998        Self::DEFAULT.clone()
15999    }
16000}
16001impl MessageData for HIL_OPTICAL_FLOW_DATA {
16002    type Message = MavMessage;
16003    const ID: u32 = 114u32;
16004    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16005    const EXTRA_CRC: u8 = 237u8;
16006    const ENCODED_LEN: usize = 44usize;
16007    fn deser(
16008        _version: MavlinkVersion,
16009        __input: &[u8],
16010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16011        let avail_len = __input.len();
16012        let mut payload_buf = [0; Self::ENCODED_LEN];
16013        let mut buf = if avail_len < Self::ENCODED_LEN {
16014            payload_buf[0..avail_len].copy_from_slice(__input);
16015            Bytes::new(&payload_buf)
16016        } else {
16017            Bytes::new(__input)
16018        };
16019        let mut __struct = Self::default();
16020        __struct.time_usec = buf.get_u64_le()?;
16021        __struct.integration_time_us = buf.get_u32_le()?;
16022        __struct.integrated_x = buf.get_f32_le()?;
16023        __struct.integrated_y = buf.get_f32_le()?;
16024        __struct.integrated_xgyro = buf.get_f32_le()?;
16025        __struct.integrated_ygyro = buf.get_f32_le()?;
16026        __struct.integrated_zgyro = buf.get_f32_le()?;
16027        __struct.time_delta_distance_us = buf.get_u32_le()?;
16028        __struct.distance = buf.get_f32_le()?;
16029        __struct.temperature = buf.get_i16_le()?;
16030        __struct.sensor_id = buf.get_u8()?;
16031        __struct.quality = buf.get_u8()?;
16032        Ok(__struct)
16033    }
16034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16035        let mut __tmp = BytesMut::new(bytes);
16036        #[allow(clippy::absurd_extreme_comparisons)]
16037        #[allow(unused_comparisons)]
16038        if __tmp.remaining() < Self::ENCODED_LEN {
16039            panic!(
16040                "buffer is too small (need {} bytes, but got {})",
16041                Self::ENCODED_LEN,
16042                __tmp.remaining(),
16043            )
16044        }
16045        __tmp.put_u64_le(self.time_usec);
16046        __tmp.put_u32_le(self.integration_time_us);
16047        __tmp.put_f32_le(self.integrated_x);
16048        __tmp.put_f32_le(self.integrated_y);
16049        __tmp.put_f32_le(self.integrated_xgyro);
16050        __tmp.put_f32_le(self.integrated_ygyro);
16051        __tmp.put_f32_le(self.integrated_zgyro);
16052        __tmp.put_u32_le(self.time_delta_distance_us);
16053        __tmp.put_f32_le(self.distance);
16054        __tmp.put_i16_le(self.temperature);
16055        __tmp.put_u8(self.sensor_id);
16056        __tmp.put_u8(self.quality);
16057        if matches!(version, MavlinkVersion::V2) {
16058            let len = __tmp.len();
16059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16060        } else {
16061            __tmp.len()
16062        }
16063    }
16064}
16065#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16066#[doc = ""]
16067#[doc = "ID: 92"]
16068#[derive(Debug, Clone, PartialEq)]
16069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16071#[cfg_attr(feature = "ts", derive(TS))]
16072#[cfg_attr(feature = "ts", ts(export))]
16073pub struct HIL_RC_INPUTS_RAW_DATA {
16074    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16075    pub time_usec: u64,
16076    #[doc = "RC channel 1 value"]
16077    pub chan1_raw: u16,
16078    #[doc = "RC channel 2 value"]
16079    pub chan2_raw: u16,
16080    #[doc = "RC channel 3 value"]
16081    pub chan3_raw: u16,
16082    #[doc = "RC channel 4 value"]
16083    pub chan4_raw: u16,
16084    #[doc = "RC channel 5 value"]
16085    pub chan5_raw: u16,
16086    #[doc = "RC channel 6 value"]
16087    pub chan6_raw: u16,
16088    #[doc = "RC channel 7 value"]
16089    pub chan7_raw: u16,
16090    #[doc = "RC channel 8 value"]
16091    pub chan8_raw: u16,
16092    #[doc = "RC channel 9 value"]
16093    pub chan9_raw: u16,
16094    #[doc = "RC channel 10 value"]
16095    pub chan10_raw: u16,
16096    #[doc = "RC channel 11 value"]
16097    pub chan11_raw: u16,
16098    #[doc = "RC channel 12 value"]
16099    pub chan12_raw: u16,
16100    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16101    pub rssi: u8,
16102}
16103impl HIL_RC_INPUTS_RAW_DATA {
16104    pub const ENCODED_LEN: usize = 33usize;
16105    pub const DEFAULT: Self = Self {
16106        time_usec: 0_u64,
16107        chan1_raw: 0_u16,
16108        chan2_raw: 0_u16,
16109        chan3_raw: 0_u16,
16110        chan4_raw: 0_u16,
16111        chan5_raw: 0_u16,
16112        chan6_raw: 0_u16,
16113        chan7_raw: 0_u16,
16114        chan8_raw: 0_u16,
16115        chan9_raw: 0_u16,
16116        chan10_raw: 0_u16,
16117        chan11_raw: 0_u16,
16118        chan12_raw: 0_u16,
16119        rssi: 0_u8,
16120    };
16121    #[cfg(feature = "arbitrary")]
16122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16123        use arbitrary::{Arbitrary, Unstructured};
16124        let mut buf = [0u8; 1024];
16125        rng.fill_bytes(&mut buf);
16126        let mut unstructured = Unstructured::new(&buf);
16127        Self::arbitrary(&mut unstructured).unwrap_or_default()
16128    }
16129}
16130impl Default for HIL_RC_INPUTS_RAW_DATA {
16131    fn default() -> Self {
16132        Self::DEFAULT.clone()
16133    }
16134}
16135impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16136    type Message = MavMessage;
16137    const ID: u32 = 92u32;
16138    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16139    const EXTRA_CRC: u8 = 54u8;
16140    const ENCODED_LEN: usize = 33usize;
16141    fn deser(
16142        _version: MavlinkVersion,
16143        __input: &[u8],
16144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16145        let avail_len = __input.len();
16146        let mut payload_buf = [0; Self::ENCODED_LEN];
16147        let mut buf = if avail_len < Self::ENCODED_LEN {
16148            payload_buf[0..avail_len].copy_from_slice(__input);
16149            Bytes::new(&payload_buf)
16150        } else {
16151            Bytes::new(__input)
16152        };
16153        let mut __struct = Self::default();
16154        __struct.time_usec = buf.get_u64_le()?;
16155        __struct.chan1_raw = buf.get_u16_le()?;
16156        __struct.chan2_raw = buf.get_u16_le()?;
16157        __struct.chan3_raw = buf.get_u16_le()?;
16158        __struct.chan4_raw = buf.get_u16_le()?;
16159        __struct.chan5_raw = buf.get_u16_le()?;
16160        __struct.chan6_raw = buf.get_u16_le()?;
16161        __struct.chan7_raw = buf.get_u16_le()?;
16162        __struct.chan8_raw = buf.get_u16_le()?;
16163        __struct.chan9_raw = buf.get_u16_le()?;
16164        __struct.chan10_raw = buf.get_u16_le()?;
16165        __struct.chan11_raw = buf.get_u16_le()?;
16166        __struct.chan12_raw = buf.get_u16_le()?;
16167        __struct.rssi = buf.get_u8()?;
16168        Ok(__struct)
16169    }
16170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16171        let mut __tmp = BytesMut::new(bytes);
16172        #[allow(clippy::absurd_extreme_comparisons)]
16173        #[allow(unused_comparisons)]
16174        if __tmp.remaining() < Self::ENCODED_LEN {
16175            panic!(
16176                "buffer is too small (need {} bytes, but got {})",
16177                Self::ENCODED_LEN,
16178                __tmp.remaining(),
16179            )
16180        }
16181        __tmp.put_u64_le(self.time_usec);
16182        __tmp.put_u16_le(self.chan1_raw);
16183        __tmp.put_u16_le(self.chan2_raw);
16184        __tmp.put_u16_le(self.chan3_raw);
16185        __tmp.put_u16_le(self.chan4_raw);
16186        __tmp.put_u16_le(self.chan5_raw);
16187        __tmp.put_u16_le(self.chan6_raw);
16188        __tmp.put_u16_le(self.chan7_raw);
16189        __tmp.put_u16_le(self.chan8_raw);
16190        __tmp.put_u16_le(self.chan9_raw);
16191        __tmp.put_u16_le(self.chan10_raw);
16192        __tmp.put_u16_le(self.chan11_raw);
16193        __tmp.put_u16_le(self.chan12_raw);
16194        __tmp.put_u8(self.rssi);
16195        if matches!(version, MavlinkVersion::V2) {
16196            let len = __tmp.len();
16197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16198        } else {
16199            __tmp.len()
16200        }
16201    }
16202}
16203#[doc = "The IMU readings in SI units in NED body frame."]
16204#[doc = ""]
16205#[doc = "ID: 107"]
16206#[derive(Debug, Clone, PartialEq)]
16207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16209#[cfg_attr(feature = "ts", derive(TS))]
16210#[cfg_attr(feature = "ts", ts(export))]
16211pub struct HIL_SENSOR_DATA {
16212    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16213    pub time_usec: u64,
16214    #[doc = "X acceleration"]
16215    pub xacc: f32,
16216    #[doc = "Y acceleration"]
16217    pub yacc: f32,
16218    #[doc = "Z acceleration"]
16219    pub zacc: f32,
16220    #[doc = "Angular speed around X axis in body frame"]
16221    pub xgyro: f32,
16222    #[doc = "Angular speed around Y axis in body frame"]
16223    pub ygyro: f32,
16224    #[doc = "Angular speed around Z axis in body frame"]
16225    pub zgyro: f32,
16226    #[doc = "X Magnetic field"]
16227    pub xmag: f32,
16228    #[doc = "Y Magnetic field"]
16229    pub ymag: f32,
16230    #[doc = "Z Magnetic field"]
16231    pub zmag: f32,
16232    #[doc = "Absolute pressure"]
16233    pub abs_pressure: f32,
16234    #[doc = "Differential pressure (airspeed)"]
16235    pub diff_pressure: f32,
16236    #[doc = "Altitude calculated from pressure"]
16237    pub pressure_alt: f32,
16238    #[doc = "Temperature"]
16239    pub temperature: f32,
16240    #[doc = "Bitmap for fields that have updated since last message"]
16241    pub fields_updated: HilSensorUpdatedFlags,
16242    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16243    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16244    pub id: u8,
16245}
16246impl HIL_SENSOR_DATA {
16247    pub const ENCODED_LEN: usize = 65usize;
16248    pub const DEFAULT: Self = Self {
16249        time_usec: 0_u64,
16250        xacc: 0.0_f32,
16251        yacc: 0.0_f32,
16252        zacc: 0.0_f32,
16253        xgyro: 0.0_f32,
16254        ygyro: 0.0_f32,
16255        zgyro: 0.0_f32,
16256        xmag: 0.0_f32,
16257        ymag: 0.0_f32,
16258        zmag: 0.0_f32,
16259        abs_pressure: 0.0_f32,
16260        diff_pressure: 0.0_f32,
16261        pressure_alt: 0.0_f32,
16262        temperature: 0.0_f32,
16263        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16264        id: 0_u8,
16265    };
16266    #[cfg(feature = "arbitrary")]
16267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16268        use arbitrary::{Arbitrary, Unstructured};
16269        let mut buf = [0u8; 1024];
16270        rng.fill_bytes(&mut buf);
16271        let mut unstructured = Unstructured::new(&buf);
16272        Self::arbitrary(&mut unstructured).unwrap_or_default()
16273    }
16274}
16275impl Default for HIL_SENSOR_DATA {
16276    fn default() -> Self {
16277        Self::DEFAULT.clone()
16278    }
16279}
16280impl MessageData for HIL_SENSOR_DATA {
16281    type Message = MavMessage;
16282    const ID: u32 = 107u32;
16283    const NAME: &'static str = "HIL_SENSOR";
16284    const EXTRA_CRC: u8 = 108u8;
16285    const ENCODED_LEN: usize = 65usize;
16286    fn deser(
16287        _version: MavlinkVersion,
16288        __input: &[u8],
16289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16290        let avail_len = __input.len();
16291        let mut payload_buf = [0; Self::ENCODED_LEN];
16292        let mut buf = if avail_len < Self::ENCODED_LEN {
16293            payload_buf[0..avail_len].copy_from_slice(__input);
16294            Bytes::new(&payload_buf)
16295        } else {
16296            Bytes::new(__input)
16297        };
16298        let mut __struct = Self::default();
16299        __struct.time_usec = buf.get_u64_le()?;
16300        __struct.xacc = buf.get_f32_le()?;
16301        __struct.yacc = buf.get_f32_le()?;
16302        __struct.zacc = buf.get_f32_le()?;
16303        __struct.xgyro = buf.get_f32_le()?;
16304        __struct.ygyro = buf.get_f32_le()?;
16305        __struct.zgyro = buf.get_f32_le()?;
16306        __struct.xmag = buf.get_f32_le()?;
16307        __struct.ymag = buf.get_f32_le()?;
16308        __struct.zmag = buf.get_f32_le()?;
16309        __struct.abs_pressure = buf.get_f32_le()?;
16310        __struct.diff_pressure = buf.get_f32_le()?;
16311        __struct.pressure_alt = buf.get_f32_le()?;
16312        __struct.temperature = buf.get_f32_le()?;
16313        let tmp = buf.get_u32_le()?;
16314        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16315            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
16316        )
16317        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16318            flag_type: "HilSensorUpdatedFlags",
16319            value: tmp as u64,
16320        })?;
16321        __struct.id = buf.get_u8()?;
16322        Ok(__struct)
16323    }
16324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16325        let mut __tmp = BytesMut::new(bytes);
16326        #[allow(clippy::absurd_extreme_comparisons)]
16327        #[allow(unused_comparisons)]
16328        if __tmp.remaining() < Self::ENCODED_LEN {
16329            panic!(
16330                "buffer is too small (need {} bytes, but got {})",
16331                Self::ENCODED_LEN,
16332                __tmp.remaining(),
16333            )
16334        }
16335        __tmp.put_u64_le(self.time_usec);
16336        __tmp.put_f32_le(self.xacc);
16337        __tmp.put_f32_le(self.yacc);
16338        __tmp.put_f32_le(self.zacc);
16339        __tmp.put_f32_le(self.xgyro);
16340        __tmp.put_f32_le(self.ygyro);
16341        __tmp.put_f32_le(self.zgyro);
16342        __tmp.put_f32_le(self.xmag);
16343        __tmp.put_f32_le(self.ymag);
16344        __tmp.put_f32_le(self.zmag);
16345        __tmp.put_f32_le(self.abs_pressure);
16346        __tmp.put_f32_le(self.diff_pressure);
16347        __tmp.put_f32_le(self.pressure_alt);
16348        __tmp.put_f32_le(self.temperature);
16349        __tmp.put_u32_le(self.fields_updated.bits() as u32);
16350        if matches!(version, MavlinkVersion::V2) {
16351            __tmp.put_u8(self.id);
16352            let len = __tmp.len();
16353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16354        } else {
16355            __tmp.len()
16356        }
16357    }
16358}
16359#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16360#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16361#[doc = ""]
16362#[doc = "ID: 90"]
16363#[derive(Debug, Clone, PartialEq)]
16364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16366#[cfg_attr(feature = "ts", derive(TS))]
16367#[cfg_attr(feature = "ts", ts(export))]
16368pub struct HIL_STATE_DATA {
16369    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16370    pub time_usec: u64,
16371    #[doc = "Roll angle"]
16372    pub roll: f32,
16373    #[doc = "Pitch angle"]
16374    pub pitch: f32,
16375    #[doc = "Yaw angle"]
16376    pub yaw: f32,
16377    #[doc = "Body frame roll / phi angular speed"]
16378    pub rollspeed: f32,
16379    #[doc = "Body frame pitch / theta angular speed"]
16380    pub pitchspeed: f32,
16381    #[doc = "Body frame yaw / psi angular speed"]
16382    pub yawspeed: f32,
16383    #[doc = "Latitude"]
16384    pub lat: i32,
16385    #[doc = "Longitude"]
16386    pub lon: i32,
16387    #[doc = "Altitude"]
16388    pub alt: i32,
16389    #[doc = "Ground X Speed (Latitude)"]
16390    pub vx: i16,
16391    #[doc = "Ground Y Speed (Longitude)"]
16392    pub vy: i16,
16393    #[doc = "Ground Z Speed (Altitude)"]
16394    pub vz: i16,
16395    #[doc = "X acceleration"]
16396    pub xacc: i16,
16397    #[doc = "Y acceleration"]
16398    pub yacc: i16,
16399    #[doc = "Z acceleration"]
16400    pub zacc: i16,
16401}
16402impl HIL_STATE_DATA {
16403    pub const ENCODED_LEN: usize = 56usize;
16404    pub const DEFAULT: Self = Self {
16405        time_usec: 0_u64,
16406        roll: 0.0_f32,
16407        pitch: 0.0_f32,
16408        yaw: 0.0_f32,
16409        rollspeed: 0.0_f32,
16410        pitchspeed: 0.0_f32,
16411        yawspeed: 0.0_f32,
16412        lat: 0_i32,
16413        lon: 0_i32,
16414        alt: 0_i32,
16415        vx: 0_i16,
16416        vy: 0_i16,
16417        vz: 0_i16,
16418        xacc: 0_i16,
16419        yacc: 0_i16,
16420        zacc: 0_i16,
16421    };
16422    #[cfg(feature = "arbitrary")]
16423    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16424        use arbitrary::{Arbitrary, Unstructured};
16425        let mut buf = [0u8; 1024];
16426        rng.fill_bytes(&mut buf);
16427        let mut unstructured = Unstructured::new(&buf);
16428        Self::arbitrary(&mut unstructured).unwrap_or_default()
16429    }
16430}
16431impl Default for HIL_STATE_DATA {
16432    fn default() -> Self {
16433        Self::DEFAULT.clone()
16434    }
16435}
16436impl MessageData for HIL_STATE_DATA {
16437    type Message = MavMessage;
16438    const ID: u32 = 90u32;
16439    const NAME: &'static str = "HIL_STATE";
16440    const EXTRA_CRC: u8 = 183u8;
16441    const ENCODED_LEN: usize = 56usize;
16442    fn deser(
16443        _version: MavlinkVersion,
16444        __input: &[u8],
16445    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16446        let avail_len = __input.len();
16447        let mut payload_buf = [0; Self::ENCODED_LEN];
16448        let mut buf = if avail_len < Self::ENCODED_LEN {
16449            payload_buf[0..avail_len].copy_from_slice(__input);
16450            Bytes::new(&payload_buf)
16451        } else {
16452            Bytes::new(__input)
16453        };
16454        let mut __struct = Self::default();
16455        __struct.time_usec = buf.get_u64_le()?;
16456        __struct.roll = buf.get_f32_le()?;
16457        __struct.pitch = buf.get_f32_le()?;
16458        __struct.yaw = buf.get_f32_le()?;
16459        __struct.rollspeed = buf.get_f32_le()?;
16460        __struct.pitchspeed = buf.get_f32_le()?;
16461        __struct.yawspeed = buf.get_f32_le()?;
16462        __struct.lat = buf.get_i32_le()?;
16463        __struct.lon = buf.get_i32_le()?;
16464        __struct.alt = buf.get_i32_le()?;
16465        __struct.vx = buf.get_i16_le()?;
16466        __struct.vy = buf.get_i16_le()?;
16467        __struct.vz = buf.get_i16_le()?;
16468        __struct.xacc = buf.get_i16_le()?;
16469        __struct.yacc = buf.get_i16_le()?;
16470        __struct.zacc = buf.get_i16_le()?;
16471        Ok(__struct)
16472    }
16473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16474        let mut __tmp = BytesMut::new(bytes);
16475        #[allow(clippy::absurd_extreme_comparisons)]
16476        #[allow(unused_comparisons)]
16477        if __tmp.remaining() < Self::ENCODED_LEN {
16478            panic!(
16479                "buffer is too small (need {} bytes, but got {})",
16480                Self::ENCODED_LEN,
16481                __tmp.remaining(),
16482            )
16483        }
16484        __tmp.put_u64_le(self.time_usec);
16485        __tmp.put_f32_le(self.roll);
16486        __tmp.put_f32_le(self.pitch);
16487        __tmp.put_f32_le(self.yaw);
16488        __tmp.put_f32_le(self.rollspeed);
16489        __tmp.put_f32_le(self.pitchspeed);
16490        __tmp.put_f32_le(self.yawspeed);
16491        __tmp.put_i32_le(self.lat);
16492        __tmp.put_i32_le(self.lon);
16493        __tmp.put_i32_le(self.alt);
16494        __tmp.put_i16_le(self.vx);
16495        __tmp.put_i16_le(self.vy);
16496        __tmp.put_i16_le(self.vz);
16497        __tmp.put_i16_le(self.xacc);
16498        __tmp.put_i16_le(self.yacc);
16499        __tmp.put_i16_le(self.zacc);
16500        if matches!(version, MavlinkVersion::V2) {
16501            let len = __tmp.len();
16502            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16503        } else {
16504            __tmp.len()
16505        }
16506    }
16507}
16508#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16509#[doc = ""]
16510#[doc = "ID: 115"]
16511#[derive(Debug, Clone, PartialEq)]
16512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16514#[cfg_attr(feature = "ts", derive(TS))]
16515#[cfg_attr(feature = "ts", ts(export))]
16516pub struct HIL_STATE_QUATERNION_DATA {
16517    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16518    pub time_usec: u64,
16519    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16520    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16521    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16522    pub attitude_quaternion: [f32; 4],
16523    #[doc = "Body frame roll / phi angular speed"]
16524    pub rollspeed: f32,
16525    #[doc = "Body frame pitch / theta angular speed"]
16526    pub pitchspeed: f32,
16527    #[doc = "Body frame yaw / psi angular speed"]
16528    pub yawspeed: f32,
16529    #[doc = "Latitude"]
16530    pub lat: i32,
16531    #[doc = "Longitude"]
16532    pub lon: i32,
16533    #[doc = "Altitude"]
16534    pub alt: i32,
16535    #[doc = "Ground X Speed (Latitude)"]
16536    pub vx: i16,
16537    #[doc = "Ground Y Speed (Longitude)"]
16538    pub vy: i16,
16539    #[doc = "Ground Z Speed (Altitude)"]
16540    pub vz: i16,
16541    #[doc = "Indicated airspeed"]
16542    pub ind_airspeed: u16,
16543    #[doc = "True airspeed"]
16544    pub true_airspeed: u16,
16545    #[doc = "X acceleration"]
16546    pub xacc: i16,
16547    #[doc = "Y acceleration"]
16548    pub yacc: i16,
16549    #[doc = "Z acceleration"]
16550    pub zacc: i16,
16551}
16552impl HIL_STATE_QUATERNION_DATA {
16553    pub const ENCODED_LEN: usize = 64usize;
16554    pub const DEFAULT: Self = Self {
16555        time_usec: 0_u64,
16556        attitude_quaternion: [0.0_f32; 4usize],
16557        rollspeed: 0.0_f32,
16558        pitchspeed: 0.0_f32,
16559        yawspeed: 0.0_f32,
16560        lat: 0_i32,
16561        lon: 0_i32,
16562        alt: 0_i32,
16563        vx: 0_i16,
16564        vy: 0_i16,
16565        vz: 0_i16,
16566        ind_airspeed: 0_u16,
16567        true_airspeed: 0_u16,
16568        xacc: 0_i16,
16569        yacc: 0_i16,
16570        zacc: 0_i16,
16571    };
16572    #[cfg(feature = "arbitrary")]
16573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16574        use arbitrary::{Arbitrary, Unstructured};
16575        let mut buf = [0u8; 1024];
16576        rng.fill_bytes(&mut buf);
16577        let mut unstructured = Unstructured::new(&buf);
16578        Self::arbitrary(&mut unstructured).unwrap_or_default()
16579    }
16580}
16581impl Default for HIL_STATE_QUATERNION_DATA {
16582    fn default() -> Self {
16583        Self::DEFAULT.clone()
16584    }
16585}
16586impl MessageData for HIL_STATE_QUATERNION_DATA {
16587    type Message = MavMessage;
16588    const ID: u32 = 115u32;
16589    const NAME: &'static str = "HIL_STATE_QUATERNION";
16590    const EXTRA_CRC: u8 = 4u8;
16591    const ENCODED_LEN: usize = 64usize;
16592    fn deser(
16593        _version: MavlinkVersion,
16594        __input: &[u8],
16595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16596        let avail_len = __input.len();
16597        let mut payload_buf = [0; Self::ENCODED_LEN];
16598        let mut buf = if avail_len < Self::ENCODED_LEN {
16599            payload_buf[0..avail_len].copy_from_slice(__input);
16600            Bytes::new(&payload_buf)
16601        } else {
16602            Bytes::new(__input)
16603        };
16604        let mut __struct = Self::default();
16605        __struct.time_usec = buf.get_u64_le()?;
16606        for v in &mut __struct.attitude_quaternion {
16607            let val = buf.get_f32_le()?;
16608            *v = val;
16609        }
16610        __struct.rollspeed = buf.get_f32_le()?;
16611        __struct.pitchspeed = buf.get_f32_le()?;
16612        __struct.yawspeed = buf.get_f32_le()?;
16613        __struct.lat = buf.get_i32_le()?;
16614        __struct.lon = buf.get_i32_le()?;
16615        __struct.alt = buf.get_i32_le()?;
16616        __struct.vx = buf.get_i16_le()?;
16617        __struct.vy = buf.get_i16_le()?;
16618        __struct.vz = buf.get_i16_le()?;
16619        __struct.ind_airspeed = buf.get_u16_le()?;
16620        __struct.true_airspeed = buf.get_u16_le()?;
16621        __struct.xacc = buf.get_i16_le()?;
16622        __struct.yacc = buf.get_i16_le()?;
16623        __struct.zacc = buf.get_i16_le()?;
16624        Ok(__struct)
16625    }
16626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16627        let mut __tmp = BytesMut::new(bytes);
16628        #[allow(clippy::absurd_extreme_comparisons)]
16629        #[allow(unused_comparisons)]
16630        if __tmp.remaining() < Self::ENCODED_LEN {
16631            panic!(
16632                "buffer is too small (need {} bytes, but got {})",
16633                Self::ENCODED_LEN,
16634                __tmp.remaining(),
16635            )
16636        }
16637        __tmp.put_u64_le(self.time_usec);
16638        for val in &self.attitude_quaternion {
16639            __tmp.put_f32_le(*val);
16640        }
16641        __tmp.put_f32_le(self.rollspeed);
16642        __tmp.put_f32_le(self.pitchspeed);
16643        __tmp.put_f32_le(self.yawspeed);
16644        __tmp.put_i32_le(self.lat);
16645        __tmp.put_i32_le(self.lon);
16646        __tmp.put_i32_le(self.alt);
16647        __tmp.put_i16_le(self.vx);
16648        __tmp.put_i16_le(self.vy);
16649        __tmp.put_i16_le(self.vz);
16650        __tmp.put_u16_le(self.ind_airspeed);
16651        __tmp.put_u16_le(self.true_airspeed);
16652        __tmp.put_i16_le(self.xacc);
16653        __tmp.put_i16_le(self.yacc);
16654        __tmp.put_i16_le(self.zacc);
16655        if matches!(version, MavlinkVersion::V2) {
16656            let len = __tmp.len();
16657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16658        } else {
16659            __tmp.len()
16660        }
16661    }
16662}
16663#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16664#[doc = ""]
16665#[doc = "ID: 242"]
16666#[derive(Debug, Clone, PartialEq)]
16667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16668#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16669#[cfg_attr(feature = "ts", derive(TS))]
16670#[cfg_attr(feature = "ts", ts(export))]
16671pub struct HOME_POSITION_DATA {
16672    #[doc = "Latitude (WGS84)"]
16673    pub latitude: i32,
16674    #[doc = "Longitude (WGS84)"]
16675    pub longitude: i32,
16676    #[doc = "Altitude (MSL). Positive for up."]
16677    pub altitude: i32,
16678    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16679    pub x: f32,
16680    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16681    pub y: f32,
16682    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16683    pub z: f32,
16684    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16687    pub q: [f32; 4],
16688    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16689    pub approach_x: f32,
16690    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16691    pub approach_y: f32,
16692    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16693    pub approach_z: f32,
16694    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16696    pub time_usec: u64,
16697}
16698impl HOME_POSITION_DATA {
16699    pub const ENCODED_LEN: usize = 60usize;
16700    pub const DEFAULT: Self = Self {
16701        latitude: 0_i32,
16702        longitude: 0_i32,
16703        altitude: 0_i32,
16704        x: 0.0_f32,
16705        y: 0.0_f32,
16706        z: 0.0_f32,
16707        q: [0.0_f32; 4usize],
16708        approach_x: 0.0_f32,
16709        approach_y: 0.0_f32,
16710        approach_z: 0.0_f32,
16711        time_usec: 0_u64,
16712    };
16713    #[cfg(feature = "arbitrary")]
16714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16715        use arbitrary::{Arbitrary, Unstructured};
16716        let mut buf = [0u8; 1024];
16717        rng.fill_bytes(&mut buf);
16718        let mut unstructured = Unstructured::new(&buf);
16719        Self::arbitrary(&mut unstructured).unwrap_or_default()
16720    }
16721}
16722impl Default for HOME_POSITION_DATA {
16723    fn default() -> Self {
16724        Self::DEFAULT.clone()
16725    }
16726}
16727impl MessageData for HOME_POSITION_DATA {
16728    type Message = MavMessage;
16729    const ID: u32 = 242u32;
16730    const NAME: &'static str = "HOME_POSITION";
16731    const EXTRA_CRC: u8 = 104u8;
16732    const ENCODED_LEN: usize = 60usize;
16733    fn deser(
16734        _version: MavlinkVersion,
16735        __input: &[u8],
16736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16737        let avail_len = __input.len();
16738        let mut payload_buf = [0; Self::ENCODED_LEN];
16739        let mut buf = if avail_len < Self::ENCODED_LEN {
16740            payload_buf[0..avail_len].copy_from_slice(__input);
16741            Bytes::new(&payload_buf)
16742        } else {
16743            Bytes::new(__input)
16744        };
16745        let mut __struct = Self::default();
16746        __struct.latitude = buf.get_i32_le()?;
16747        __struct.longitude = buf.get_i32_le()?;
16748        __struct.altitude = buf.get_i32_le()?;
16749        __struct.x = buf.get_f32_le()?;
16750        __struct.y = buf.get_f32_le()?;
16751        __struct.z = buf.get_f32_le()?;
16752        for v in &mut __struct.q {
16753            let val = buf.get_f32_le()?;
16754            *v = val;
16755        }
16756        __struct.approach_x = buf.get_f32_le()?;
16757        __struct.approach_y = buf.get_f32_le()?;
16758        __struct.approach_z = buf.get_f32_le()?;
16759        __struct.time_usec = buf.get_u64_le()?;
16760        Ok(__struct)
16761    }
16762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16763        let mut __tmp = BytesMut::new(bytes);
16764        #[allow(clippy::absurd_extreme_comparisons)]
16765        #[allow(unused_comparisons)]
16766        if __tmp.remaining() < Self::ENCODED_LEN {
16767            panic!(
16768                "buffer is too small (need {} bytes, but got {})",
16769                Self::ENCODED_LEN,
16770                __tmp.remaining(),
16771            )
16772        }
16773        __tmp.put_i32_le(self.latitude);
16774        __tmp.put_i32_le(self.longitude);
16775        __tmp.put_i32_le(self.altitude);
16776        __tmp.put_f32_le(self.x);
16777        __tmp.put_f32_le(self.y);
16778        __tmp.put_f32_le(self.z);
16779        for val in &self.q {
16780            __tmp.put_f32_le(*val);
16781        }
16782        __tmp.put_f32_le(self.approach_x);
16783        __tmp.put_f32_le(self.approach_y);
16784        __tmp.put_f32_le(self.approach_z);
16785        if matches!(version, MavlinkVersion::V2) {
16786            __tmp.put_u64_le(self.time_usec);
16787            let len = __tmp.len();
16788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16789        } else {
16790            __tmp.len()
16791        }
16792    }
16793}
16794#[doc = "Temperature and humidity from hygrometer."]
16795#[doc = ""]
16796#[doc = "ID: 12920"]
16797#[derive(Debug, Clone, PartialEq)]
16798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16800#[cfg_attr(feature = "ts", derive(TS))]
16801#[cfg_attr(feature = "ts", ts(export))]
16802pub struct HYGROMETER_SENSOR_DATA {
16803    #[doc = "Temperature"]
16804    pub temperature: i16,
16805    #[doc = "Humidity"]
16806    pub humidity: u16,
16807    #[doc = "Hygrometer ID"]
16808    pub id: u8,
16809}
16810impl HYGROMETER_SENSOR_DATA {
16811    pub const ENCODED_LEN: usize = 5usize;
16812    pub const DEFAULT: Self = Self {
16813        temperature: 0_i16,
16814        humidity: 0_u16,
16815        id: 0_u8,
16816    };
16817    #[cfg(feature = "arbitrary")]
16818    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16819        use arbitrary::{Arbitrary, Unstructured};
16820        let mut buf = [0u8; 1024];
16821        rng.fill_bytes(&mut buf);
16822        let mut unstructured = Unstructured::new(&buf);
16823        Self::arbitrary(&mut unstructured).unwrap_or_default()
16824    }
16825}
16826impl Default for HYGROMETER_SENSOR_DATA {
16827    fn default() -> Self {
16828        Self::DEFAULT.clone()
16829    }
16830}
16831impl MessageData for HYGROMETER_SENSOR_DATA {
16832    type Message = MavMessage;
16833    const ID: u32 = 12920u32;
16834    const NAME: &'static str = "HYGROMETER_SENSOR";
16835    const EXTRA_CRC: u8 = 20u8;
16836    const ENCODED_LEN: usize = 5usize;
16837    fn deser(
16838        _version: MavlinkVersion,
16839        __input: &[u8],
16840    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16841        let avail_len = __input.len();
16842        let mut payload_buf = [0; Self::ENCODED_LEN];
16843        let mut buf = if avail_len < Self::ENCODED_LEN {
16844            payload_buf[0..avail_len].copy_from_slice(__input);
16845            Bytes::new(&payload_buf)
16846        } else {
16847            Bytes::new(__input)
16848        };
16849        let mut __struct = Self::default();
16850        __struct.temperature = buf.get_i16_le()?;
16851        __struct.humidity = buf.get_u16_le()?;
16852        __struct.id = buf.get_u8()?;
16853        Ok(__struct)
16854    }
16855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16856        let mut __tmp = BytesMut::new(bytes);
16857        #[allow(clippy::absurd_extreme_comparisons)]
16858        #[allow(unused_comparisons)]
16859        if __tmp.remaining() < Self::ENCODED_LEN {
16860            panic!(
16861                "buffer is too small (need {} bytes, but got {})",
16862                Self::ENCODED_LEN,
16863                __tmp.remaining(),
16864            )
16865        }
16866        __tmp.put_i16_le(self.temperature);
16867        __tmp.put_u16_le(self.humidity);
16868        __tmp.put_u8(self.id);
16869        if matches!(version, MavlinkVersion::V2) {
16870            let len = __tmp.len();
16871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16872        } else {
16873            __tmp.len()
16874        }
16875    }
16876}
16877#[doc = "Illuminator status."]
16878#[doc = ""]
16879#[doc = "ID: 440"]
16880#[derive(Debug, Clone, PartialEq)]
16881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16883#[cfg_attr(feature = "ts", derive(TS))]
16884#[cfg_attr(feature = "ts", ts(export))]
16885pub struct ILLUMINATOR_STATUS_DATA {
16886    #[doc = "Time since the start-up of the illuminator in ms"]
16887    pub uptime_ms: u32,
16888    #[doc = "Errors"]
16889    pub error_status: IlluminatorErrorFlags,
16890    #[doc = "Illuminator brightness"]
16891    pub brightness: f32,
16892    #[doc = "Illuminator strobing period in seconds"]
16893    pub strobe_period: f32,
16894    #[doc = "Illuminator strobing duty cycle"]
16895    pub strobe_duty_cycle: f32,
16896    #[doc = "Temperature in Celsius"]
16897    pub temp_c: f32,
16898    #[doc = "Minimum strobing period in seconds"]
16899    pub min_strobe_period: f32,
16900    #[doc = "Maximum strobing period in seconds"]
16901    pub max_strobe_period: f32,
16902    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16903    pub enable: u8,
16904    #[doc = "Supported illuminator modes"]
16905    pub mode_bitmask: IlluminatorMode,
16906    #[doc = "Illuminator mode"]
16907    pub mode: IlluminatorMode,
16908}
16909impl ILLUMINATOR_STATUS_DATA {
16910    pub const ENCODED_LEN: usize = 35usize;
16911    pub const DEFAULT: Self = Self {
16912        uptime_ms: 0_u32,
16913        error_status: IlluminatorErrorFlags::DEFAULT,
16914        brightness: 0.0_f32,
16915        strobe_period: 0.0_f32,
16916        strobe_duty_cycle: 0.0_f32,
16917        temp_c: 0.0_f32,
16918        min_strobe_period: 0.0_f32,
16919        max_strobe_period: 0.0_f32,
16920        enable: 0_u8,
16921        mode_bitmask: IlluminatorMode::DEFAULT,
16922        mode: IlluminatorMode::DEFAULT,
16923    };
16924    #[cfg(feature = "arbitrary")]
16925    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16926        use arbitrary::{Arbitrary, Unstructured};
16927        let mut buf = [0u8; 1024];
16928        rng.fill_bytes(&mut buf);
16929        let mut unstructured = Unstructured::new(&buf);
16930        Self::arbitrary(&mut unstructured).unwrap_or_default()
16931    }
16932}
16933impl Default for ILLUMINATOR_STATUS_DATA {
16934    fn default() -> Self {
16935        Self::DEFAULT.clone()
16936    }
16937}
16938impl MessageData for ILLUMINATOR_STATUS_DATA {
16939    type Message = MavMessage;
16940    const ID: u32 = 440u32;
16941    const NAME: &'static str = "ILLUMINATOR_STATUS";
16942    const EXTRA_CRC: u8 = 66u8;
16943    const ENCODED_LEN: usize = 35usize;
16944    fn deser(
16945        _version: MavlinkVersion,
16946        __input: &[u8],
16947    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16948        let avail_len = __input.len();
16949        let mut payload_buf = [0; Self::ENCODED_LEN];
16950        let mut buf = if avail_len < Self::ENCODED_LEN {
16951            payload_buf[0..avail_len].copy_from_slice(__input);
16952            Bytes::new(&payload_buf)
16953        } else {
16954            Bytes::new(__input)
16955        };
16956        let mut __struct = Self::default();
16957        __struct.uptime_ms = buf.get_u32_le()?;
16958        let tmp = buf.get_u32_le()?;
16959        __struct.error_status = IlluminatorErrorFlags::from_bits(
16960            tmp as <IlluminatorErrorFlags as Flags>::Bits,
16961        )
16962        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16963            flag_type: "IlluminatorErrorFlags",
16964            value: tmp as u64,
16965        })?;
16966        __struct.brightness = buf.get_f32_le()?;
16967        __struct.strobe_period = buf.get_f32_le()?;
16968        __struct.strobe_duty_cycle = buf.get_f32_le()?;
16969        __struct.temp_c = buf.get_f32_le()?;
16970        __struct.min_strobe_period = buf.get_f32_le()?;
16971        __struct.max_strobe_period = buf.get_f32_le()?;
16972        __struct.enable = buf.get_u8()?;
16973        let tmp = buf.get_u8()?;
16974        __struct.mode_bitmask =
16975            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16976                enum_type: "IlluminatorMode",
16977                value: tmp as u64,
16978            })?;
16979        let tmp = buf.get_u8()?;
16980        __struct.mode =
16981            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16982                enum_type: "IlluminatorMode",
16983                value: tmp as u64,
16984            })?;
16985        Ok(__struct)
16986    }
16987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16988        let mut __tmp = BytesMut::new(bytes);
16989        #[allow(clippy::absurd_extreme_comparisons)]
16990        #[allow(unused_comparisons)]
16991        if __tmp.remaining() < Self::ENCODED_LEN {
16992            panic!(
16993                "buffer is too small (need {} bytes, but got {})",
16994                Self::ENCODED_LEN,
16995                __tmp.remaining(),
16996            )
16997        }
16998        __tmp.put_u32_le(self.uptime_ms);
16999        __tmp.put_u32_le(self.error_status.bits() as u32);
17000        __tmp.put_f32_le(self.brightness);
17001        __tmp.put_f32_le(self.strobe_period);
17002        __tmp.put_f32_le(self.strobe_duty_cycle);
17003        __tmp.put_f32_le(self.temp_c);
17004        __tmp.put_f32_le(self.min_strobe_period);
17005        __tmp.put_f32_le(self.max_strobe_period);
17006        __tmp.put_u8(self.enable);
17007        __tmp.put_u8(self.mode_bitmask as u8);
17008        __tmp.put_u8(self.mode as u8);
17009        if matches!(version, MavlinkVersion::V2) {
17010            let len = __tmp.len();
17011            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17012        } else {
17013            __tmp.len()
17014        }
17015    }
17016}
17017#[doc = "Status of the Iridium SBD link."]
17018#[doc = ""]
17019#[doc = "ID: 335"]
17020#[derive(Debug, Clone, PartialEq)]
17021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17023#[cfg_attr(feature = "ts", derive(TS))]
17024#[cfg_attr(feature = "ts", ts(export))]
17025pub struct ISBD_LINK_STATUS_DATA {
17026    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17027    pub timestamp: u64,
17028    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17029    pub last_heartbeat: u64,
17030    #[doc = "Number of failed SBD sessions."]
17031    pub failed_sessions: u16,
17032    #[doc = "Number of successful SBD sessions."]
17033    pub successful_sessions: u16,
17034    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17035    pub signal_quality: u8,
17036    #[doc = "1: Ring call pending, 0: No call pending."]
17037    pub ring_pending: u8,
17038    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17039    pub tx_session_pending: u8,
17040    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17041    pub rx_session_pending: u8,
17042}
17043impl ISBD_LINK_STATUS_DATA {
17044    pub const ENCODED_LEN: usize = 24usize;
17045    pub const DEFAULT: Self = Self {
17046        timestamp: 0_u64,
17047        last_heartbeat: 0_u64,
17048        failed_sessions: 0_u16,
17049        successful_sessions: 0_u16,
17050        signal_quality: 0_u8,
17051        ring_pending: 0_u8,
17052        tx_session_pending: 0_u8,
17053        rx_session_pending: 0_u8,
17054    };
17055    #[cfg(feature = "arbitrary")]
17056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17057        use arbitrary::{Arbitrary, Unstructured};
17058        let mut buf = [0u8; 1024];
17059        rng.fill_bytes(&mut buf);
17060        let mut unstructured = Unstructured::new(&buf);
17061        Self::arbitrary(&mut unstructured).unwrap_or_default()
17062    }
17063}
17064impl Default for ISBD_LINK_STATUS_DATA {
17065    fn default() -> Self {
17066        Self::DEFAULT.clone()
17067    }
17068}
17069impl MessageData for ISBD_LINK_STATUS_DATA {
17070    type Message = MavMessage;
17071    const ID: u32 = 335u32;
17072    const NAME: &'static str = "ISBD_LINK_STATUS";
17073    const EXTRA_CRC: u8 = 225u8;
17074    const ENCODED_LEN: usize = 24usize;
17075    fn deser(
17076        _version: MavlinkVersion,
17077        __input: &[u8],
17078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17079        let avail_len = __input.len();
17080        let mut payload_buf = [0; Self::ENCODED_LEN];
17081        let mut buf = if avail_len < Self::ENCODED_LEN {
17082            payload_buf[0..avail_len].copy_from_slice(__input);
17083            Bytes::new(&payload_buf)
17084        } else {
17085            Bytes::new(__input)
17086        };
17087        let mut __struct = Self::default();
17088        __struct.timestamp = buf.get_u64_le()?;
17089        __struct.last_heartbeat = buf.get_u64_le()?;
17090        __struct.failed_sessions = buf.get_u16_le()?;
17091        __struct.successful_sessions = buf.get_u16_le()?;
17092        __struct.signal_quality = buf.get_u8()?;
17093        __struct.ring_pending = buf.get_u8()?;
17094        __struct.tx_session_pending = buf.get_u8()?;
17095        __struct.rx_session_pending = buf.get_u8()?;
17096        Ok(__struct)
17097    }
17098    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17099        let mut __tmp = BytesMut::new(bytes);
17100        #[allow(clippy::absurd_extreme_comparisons)]
17101        #[allow(unused_comparisons)]
17102        if __tmp.remaining() < Self::ENCODED_LEN {
17103            panic!(
17104                "buffer is too small (need {} bytes, but got {})",
17105                Self::ENCODED_LEN,
17106                __tmp.remaining(),
17107            )
17108        }
17109        __tmp.put_u64_le(self.timestamp);
17110        __tmp.put_u64_le(self.last_heartbeat);
17111        __tmp.put_u16_le(self.failed_sessions);
17112        __tmp.put_u16_le(self.successful_sessions);
17113        __tmp.put_u8(self.signal_quality);
17114        __tmp.put_u8(self.ring_pending);
17115        __tmp.put_u8(self.tx_session_pending);
17116        __tmp.put_u8(self.rx_session_pending);
17117        if matches!(version, MavlinkVersion::V2) {
17118            let len = __tmp.len();
17119            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17120        } else {
17121            __tmp.len()
17122        }
17123    }
17124}
17125#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17126#[doc = ""]
17127#[doc = "ID: 149"]
17128#[derive(Debug, Clone, PartialEq)]
17129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17131#[cfg_attr(feature = "ts", derive(TS))]
17132#[cfg_attr(feature = "ts", ts(export))]
17133pub struct LANDING_TARGET_DATA {
17134    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17135    pub time_usec: u64,
17136    #[doc = "X-axis angular offset of the target from the center of the image"]
17137    pub angle_x: f32,
17138    #[doc = "Y-axis angular offset of the target from the center of the image"]
17139    pub angle_y: f32,
17140    #[doc = "Distance to the target from the vehicle"]
17141    pub distance: f32,
17142    #[doc = "Size of target along x-axis"]
17143    pub size_x: f32,
17144    #[doc = "Size of target along y-axis"]
17145    pub size_y: f32,
17146    #[doc = "The ID of the target if multiple targets are present"]
17147    pub target_num: u8,
17148    #[doc = "Coordinate frame used for following fields."]
17149    pub frame: MavFrame,
17150    #[doc = "X Position of the landing target in MAV_FRAME"]
17151    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17152    pub x: f32,
17153    #[doc = "Y Position of the landing target in MAV_FRAME"]
17154    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17155    pub y: f32,
17156    #[doc = "Z Position of the landing target in MAV_FRAME"]
17157    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17158    pub z: f32,
17159    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17160    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17161    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17162    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17163    pub q: [f32; 4],
17164    #[doc = "Type of landing target"]
17165    #[cfg_attr(feature = "serde", serde(default))]
17166    pub mavtype: LandingTargetType,
17167    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17168    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17169    pub position_valid: u8,
17170}
17171impl LANDING_TARGET_DATA {
17172    pub const ENCODED_LEN: usize = 60usize;
17173    pub const DEFAULT: Self = Self {
17174        time_usec: 0_u64,
17175        angle_x: 0.0_f32,
17176        angle_y: 0.0_f32,
17177        distance: 0.0_f32,
17178        size_x: 0.0_f32,
17179        size_y: 0.0_f32,
17180        target_num: 0_u8,
17181        frame: MavFrame::DEFAULT,
17182        x: 0.0_f32,
17183        y: 0.0_f32,
17184        z: 0.0_f32,
17185        q: [0.0_f32; 4usize],
17186        mavtype: LandingTargetType::DEFAULT,
17187        position_valid: 0_u8,
17188    };
17189    #[cfg(feature = "arbitrary")]
17190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17191        use arbitrary::{Arbitrary, Unstructured};
17192        let mut buf = [0u8; 1024];
17193        rng.fill_bytes(&mut buf);
17194        let mut unstructured = Unstructured::new(&buf);
17195        Self::arbitrary(&mut unstructured).unwrap_or_default()
17196    }
17197}
17198impl Default for LANDING_TARGET_DATA {
17199    fn default() -> Self {
17200        Self::DEFAULT.clone()
17201    }
17202}
17203impl MessageData for LANDING_TARGET_DATA {
17204    type Message = MavMessage;
17205    const ID: u32 = 149u32;
17206    const NAME: &'static str = "LANDING_TARGET";
17207    const EXTRA_CRC: u8 = 200u8;
17208    const ENCODED_LEN: usize = 60usize;
17209    fn deser(
17210        _version: MavlinkVersion,
17211        __input: &[u8],
17212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17213        let avail_len = __input.len();
17214        let mut payload_buf = [0; Self::ENCODED_LEN];
17215        let mut buf = if avail_len < Self::ENCODED_LEN {
17216            payload_buf[0..avail_len].copy_from_slice(__input);
17217            Bytes::new(&payload_buf)
17218        } else {
17219            Bytes::new(__input)
17220        };
17221        let mut __struct = Self::default();
17222        __struct.time_usec = buf.get_u64_le()?;
17223        __struct.angle_x = buf.get_f32_le()?;
17224        __struct.angle_y = buf.get_f32_le()?;
17225        __struct.distance = buf.get_f32_le()?;
17226        __struct.size_x = buf.get_f32_le()?;
17227        __struct.size_y = buf.get_f32_le()?;
17228        __struct.target_num = buf.get_u8()?;
17229        let tmp = buf.get_u8()?;
17230        __struct.frame =
17231            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17232                enum_type: "MavFrame",
17233                value: tmp as u64,
17234            })?;
17235        __struct.x = buf.get_f32_le()?;
17236        __struct.y = buf.get_f32_le()?;
17237        __struct.z = buf.get_f32_le()?;
17238        for v in &mut __struct.q {
17239            let val = buf.get_f32_le()?;
17240            *v = val;
17241        }
17242        let tmp = buf.get_u8()?;
17243        __struct.mavtype =
17244            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17245                enum_type: "LandingTargetType",
17246                value: tmp as u64,
17247            })?;
17248        __struct.position_valid = buf.get_u8()?;
17249        Ok(__struct)
17250    }
17251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17252        let mut __tmp = BytesMut::new(bytes);
17253        #[allow(clippy::absurd_extreme_comparisons)]
17254        #[allow(unused_comparisons)]
17255        if __tmp.remaining() < Self::ENCODED_LEN {
17256            panic!(
17257                "buffer is too small (need {} bytes, but got {})",
17258                Self::ENCODED_LEN,
17259                __tmp.remaining(),
17260            )
17261        }
17262        __tmp.put_u64_le(self.time_usec);
17263        __tmp.put_f32_le(self.angle_x);
17264        __tmp.put_f32_le(self.angle_y);
17265        __tmp.put_f32_le(self.distance);
17266        __tmp.put_f32_le(self.size_x);
17267        __tmp.put_f32_le(self.size_y);
17268        __tmp.put_u8(self.target_num);
17269        __tmp.put_u8(self.frame as u8);
17270        if matches!(version, MavlinkVersion::V2) {
17271            __tmp.put_f32_le(self.x);
17272            __tmp.put_f32_le(self.y);
17273            __tmp.put_f32_le(self.z);
17274            for val in &self.q {
17275                __tmp.put_f32_le(*val);
17276            }
17277            __tmp.put_u8(self.mavtype as u8);
17278            __tmp.put_u8(self.position_valid);
17279            let len = __tmp.len();
17280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17281        } else {
17282            __tmp.len()
17283        }
17284    }
17285}
17286#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17287#[doc = ""]
17288#[doc = "ID: 8"]
17289#[derive(Debug, Clone, PartialEq)]
17290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17292#[cfg_attr(feature = "ts", derive(TS))]
17293#[cfg_attr(feature = "ts", ts(export))]
17294pub struct LINK_NODE_STATUS_DATA {
17295    #[doc = "Timestamp (time since system boot)."]
17296    pub timestamp: u64,
17297    #[doc = "Transmit rate"]
17298    pub tx_rate: u32,
17299    #[doc = "Receive rate"]
17300    pub rx_rate: u32,
17301    #[doc = "Messages sent"]
17302    pub messages_sent: u32,
17303    #[doc = "Messages received (estimated from counting seq)"]
17304    pub messages_received: u32,
17305    #[doc = "Messages lost (estimated from counting seq)"]
17306    pub messages_lost: u32,
17307    #[doc = "Number of bytes that could not be parsed correctly."]
17308    pub rx_parse_err: u16,
17309    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17310    pub tx_overflows: u16,
17311    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17312    pub rx_overflows: u16,
17313    #[doc = "Remaining free transmit buffer space"]
17314    pub tx_buf: u8,
17315    #[doc = "Remaining free receive buffer space"]
17316    pub rx_buf: u8,
17317}
17318impl LINK_NODE_STATUS_DATA {
17319    pub const ENCODED_LEN: usize = 36usize;
17320    pub const DEFAULT: Self = Self {
17321        timestamp: 0_u64,
17322        tx_rate: 0_u32,
17323        rx_rate: 0_u32,
17324        messages_sent: 0_u32,
17325        messages_received: 0_u32,
17326        messages_lost: 0_u32,
17327        rx_parse_err: 0_u16,
17328        tx_overflows: 0_u16,
17329        rx_overflows: 0_u16,
17330        tx_buf: 0_u8,
17331        rx_buf: 0_u8,
17332    };
17333    #[cfg(feature = "arbitrary")]
17334    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17335        use arbitrary::{Arbitrary, Unstructured};
17336        let mut buf = [0u8; 1024];
17337        rng.fill_bytes(&mut buf);
17338        let mut unstructured = Unstructured::new(&buf);
17339        Self::arbitrary(&mut unstructured).unwrap_or_default()
17340    }
17341}
17342impl Default for LINK_NODE_STATUS_DATA {
17343    fn default() -> Self {
17344        Self::DEFAULT.clone()
17345    }
17346}
17347impl MessageData for LINK_NODE_STATUS_DATA {
17348    type Message = MavMessage;
17349    const ID: u32 = 8u32;
17350    const NAME: &'static str = "LINK_NODE_STATUS";
17351    const EXTRA_CRC: u8 = 117u8;
17352    const ENCODED_LEN: usize = 36usize;
17353    fn deser(
17354        _version: MavlinkVersion,
17355        __input: &[u8],
17356    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17357        let avail_len = __input.len();
17358        let mut payload_buf = [0; Self::ENCODED_LEN];
17359        let mut buf = if avail_len < Self::ENCODED_LEN {
17360            payload_buf[0..avail_len].copy_from_slice(__input);
17361            Bytes::new(&payload_buf)
17362        } else {
17363            Bytes::new(__input)
17364        };
17365        let mut __struct = Self::default();
17366        __struct.timestamp = buf.get_u64_le()?;
17367        __struct.tx_rate = buf.get_u32_le()?;
17368        __struct.rx_rate = buf.get_u32_le()?;
17369        __struct.messages_sent = buf.get_u32_le()?;
17370        __struct.messages_received = buf.get_u32_le()?;
17371        __struct.messages_lost = buf.get_u32_le()?;
17372        __struct.rx_parse_err = buf.get_u16_le()?;
17373        __struct.tx_overflows = buf.get_u16_le()?;
17374        __struct.rx_overflows = buf.get_u16_le()?;
17375        __struct.tx_buf = buf.get_u8()?;
17376        __struct.rx_buf = buf.get_u8()?;
17377        Ok(__struct)
17378    }
17379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17380        let mut __tmp = BytesMut::new(bytes);
17381        #[allow(clippy::absurd_extreme_comparisons)]
17382        #[allow(unused_comparisons)]
17383        if __tmp.remaining() < Self::ENCODED_LEN {
17384            panic!(
17385                "buffer is too small (need {} bytes, but got {})",
17386                Self::ENCODED_LEN,
17387                __tmp.remaining(),
17388            )
17389        }
17390        __tmp.put_u64_le(self.timestamp);
17391        __tmp.put_u32_le(self.tx_rate);
17392        __tmp.put_u32_le(self.rx_rate);
17393        __tmp.put_u32_le(self.messages_sent);
17394        __tmp.put_u32_le(self.messages_received);
17395        __tmp.put_u32_le(self.messages_lost);
17396        __tmp.put_u16_le(self.rx_parse_err);
17397        __tmp.put_u16_le(self.tx_overflows);
17398        __tmp.put_u16_le(self.rx_overflows);
17399        __tmp.put_u8(self.tx_buf);
17400        __tmp.put_u8(self.rx_buf);
17401        if matches!(version, MavlinkVersion::V2) {
17402            let len = __tmp.len();
17403            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17404        } else {
17405            __tmp.len()
17406        }
17407    }
17408}
17409#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17410#[doc = ""]
17411#[doc = "ID: 32"]
17412#[derive(Debug, Clone, PartialEq)]
17413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17415#[cfg_attr(feature = "ts", derive(TS))]
17416#[cfg_attr(feature = "ts", ts(export))]
17417pub struct LOCAL_POSITION_NED_DATA {
17418    #[doc = "Timestamp (time since system boot)."]
17419    pub time_boot_ms: u32,
17420    #[doc = "X Position"]
17421    pub x: f32,
17422    #[doc = "Y Position"]
17423    pub y: f32,
17424    #[doc = "Z Position"]
17425    pub z: f32,
17426    #[doc = "X Speed"]
17427    pub vx: f32,
17428    #[doc = "Y Speed"]
17429    pub vy: f32,
17430    #[doc = "Z Speed"]
17431    pub vz: f32,
17432}
17433impl LOCAL_POSITION_NED_DATA {
17434    pub const ENCODED_LEN: usize = 28usize;
17435    pub const DEFAULT: Self = Self {
17436        time_boot_ms: 0_u32,
17437        x: 0.0_f32,
17438        y: 0.0_f32,
17439        z: 0.0_f32,
17440        vx: 0.0_f32,
17441        vy: 0.0_f32,
17442        vz: 0.0_f32,
17443    };
17444    #[cfg(feature = "arbitrary")]
17445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17446        use arbitrary::{Arbitrary, Unstructured};
17447        let mut buf = [0u8; 1024];
17448        rng.fill_bytes(&mut buf);
17449        let mut unstructured = Unstructured::new(&buf);
17450        Self::arbitrary(&mut unstructured).unwrap_or_default()
17451    }
17452}
17453impl Default for LOCAL_POSITION_NED_DATA {
17454    fn default() -> Self {
17455        Self::DEFAULT.clone()
17456    }
17457}
17458impl MessageData for LOCAL_POSITION_NED_DATA {
17459    type Message = MavMessage;
17460    const ID: u32 = 32u32;
17461    const NAME: &'static str = "LOCAL_POSITION_NED";
17462    const EXTRA_CRC: u8 = 185u8;
17463    const ENCODED_LEN: usize = 28usize;
17464    fn deser(
17465        _version: MavlinkVersion,
17466        __input: &[u8],
17467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17468        let avail_len = __input.len();
17469        let mut payload_buf = [0; Self::ENCODED_LEN];
17470        let mut buf = if avail_len < Self::ENCODED_LEN {
17471            payload_buf[0..avail_len].copy_from_slice(__input);
17472            Bytes::new(&payload_buf)
17473        } else {
17474            Bytes::new(__input)
17475        };
17476        let mut __struct = Self::default();
17477        __struct.time_boot_ms = buf.get_u32_le()?;
17478        __struct.x = buf.get_f32_le()?;
17479        __struct.y = buf.get_f32_le()?;
17480        __struct.z = buf.get_f32_le()?;
17481        __struct.vx = buf.get_f32_le()?;
17482        __struct.vy = buf.get_f32_le()?;
17483        __struct.vz = buf.get_f32_le()?;
17484        Ok(__struct)
17485    }
17486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17487        let mut __tmp = BytesMut::new(bytes);
17488        #[allow(clippy::absurd_extreme_comparisons)]
17489        #[allow(unused_comparisons)]
17490        if __tmp.remaining() < Self::ENCODED_LEN {
17491            panic!(
17492                "buffer is too small (need {} bytes, but got {})",
17493                Self::ENCODED_LEN,
17494                __tmp.remaining(),
17495            )
17496        }
17497        __tmp.put_u32_le(self.time_boot_ms);
17498        __tmp.put_f32_le(self.x);
17499        __tmp.put_f32_le(self.y);
17500        __tmp.put_f32_le(self.z);
17501        __tmp.put_f32_le(self.vx);
17502        __tmp.put_f32_le(self.vy);
17503        __tmp.put_f32_le(self.vz);
17504        if matches!(version, MavlinkVersion::V2) {
17505            let len = __tmp.len();
17506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17507        } else {
17508            __tmp.len()
17509        }
17510    }
17511}
17512#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17513#[doc = ""]
17514#[doc = "ID: 64"]
17515#[derive(Debug, Clone, PartialEq)]
17516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17518#[cfg_attr(feature = "ts", derive(TS))]
17519#[cfg_attr(feature = "ts", ts(export))]
17520pub struct LOCAL_POSITION_NED_COV_DATA {
17521    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17522    pub time_usec: u64,
17523    #[doc = "X Position"]
17524    pub x: f32,
17525    #[doc = "Y Position"]
17526    pub y: f32,
17527    #[doc = "Z Position"]
17528    pub z: f32,
17529    #[doc = "X Speed"]
17530    pub vx: f32,
17531    #[doc = "Y Speed"]
17532    pub vy: f32,
17533    #[doc = "Z Speed"]
17534    pub vz: f32,
17535    #[doc = "X Acceleration"]
17536    pub ax: f32,
17537    #[doc = "Y Acceleration"]
17538    pub ay: f32,
17539    #[doc = "Z Acceleration"]
17540    pub az: f32,
17541    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17542    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17543    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17544    pub covariance: [f32; 45],
17545    #[doc = "Class id of the estimator this estimate originated from."]
17546    pub estimator_type: MavEstimatorType,
17547}
17548impl LOCAL_POSITION_NED_COV_DATA {
17549    pub const ENCODED_LEN: usize = 225usize;
17550    pub const DEFAULT: Self = Self {
17551        time_usec: 0_u64,
17552        x: 0.0_f32,
17553        y: 0.0_f32,
17554        z: 0.0_f32,
17555        vx: 0.0_f32,
17556        vy: 0.0_f32,
17557        vz: 0.0_f32,
17558        ax: 0.0_f32,
17559        ay: 0.0_f32,
17560        az: 0.0_f32,
17561        covariance: [0.0_f32; 45usize],
17562        estimator_type: MavEstimatorType::DEFAULT,
17563    };
17564    #[cfg(feature = "arbitrary")]
17565    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17566        use arbitrary::{Arbitrary, Unstructured};
17567        let mut buf = [0u8; 1024];
17568        rng.fill_bytes(&mut buf);
17569        let mut unstructured = Unstructured::new(&buf);
17570        Self::arbitrary(&mut unstructured).unwrap_or_default()
17571    }
17572}
17573impl Default for LOCAL_POSITION_NED_COV_DATA {
17574    fn default() -> Self {
17575        Self::DEFAULT.clone()
17576    }
17577}
17578impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17579    type Message = MavMessage;
17580    const ID: u32 = 64u32;
17581    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17582    const EXTRA_CRC: u8 = 191u8;
17583    const ENCODED_LEN: usize = 225usize;
17584    fn deser(
17585        _version: MavlinkVersion,
17586        __input: &[u8],
17587    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17588        let avail_len = __input.len();
17589        let mut payload_buf = [0; Self::ENCODED_LEN];
17590        let mut buf = if avail_len < Self::ENCODED_LEN {
17591            payload_buf[0..avail_len].copy_from_slice(__input);
17592            Bytes::new(&payload_buf)
17593        } else {
17594            Bytes::new(__input)
17595        };
17596        let mut __struct = Self::default();
17597        __struct.time_usec = buf.get_u64_le()?;
17598        __struct.x = buf.get_f32_le()?;
17599        __struct.y = buf.get_f32_le()?;
17600        __struct.z = buf.get_f32_le()?;
17601        __struct.vx = buf.get_f32_le()?;
17602        __struct.vy = buf.get_f32_le()?;
17603        __struct.vz = buf.get_f32_le()?;
17604        __struct.ax = buf.get_f32_le()?;
17605        __struct.ay = buf.get_f32_le()?;
17606        __struct.az = buf.get_f32_le()?;
17607        for v in &mut __struct.covariance {
17608            let val = buf.get_f32_le()?;
17609            *v = val;
17610        }
17611        let tmp = buf.get_u8()?;
17612        __struct.estimator_type =
17613            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17614                enum_type: "MavEstimatorType",
17615                value: tmp as u64,
17616            })?;
17617        Ok(__struct)
17618    }
17619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17620        let mut __tmp = BytesMut::new(bytes);
17621        #[allow(clippy::absurd_extreme_comparisons)]
17622        #[allow(unused_comparisons)]
17623        if __tmp.remaining() < Self::ENCODED_LEN {
17624            panic!(
17625                "buffer is too small (need {} bytes, but got {})",
17626                Self::ENCODED_LEN,
17627                __tmp.remaining(),
17628            )
17629        }
17630        __tmp.put_u64_le(self.time_usec);
17631        __tmp.put_f32_le(self.x);
17632        __tmp.put_f32_le(self.y);
17633        __tmp.put_f32_le(self.z);
17634        __tmp.put_f32_le(self.vx);
17635        __tmp.put_f32_le(self.vy);
17636        __tmp.put_f32_le(self.vz);
17637        __tmp.put_f32_le(self.ax);
17638        __tmp.put_f32_le(self.ay);
17639        __tmp.put_f32_le(self.az);
17640        for val in &self.covariance {
17641            __tmp.put_f32_le(*val);
17642        }
17643        __tmp.put_u8(self.estimator_type as u8);
17644        if matches!(version, MavlinkVersion::V2) {
17645            let len = __tmp.len();
17646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17647        } else {
17648            __tmp.len()
17649        }
17650    }
17651}
17652#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17653#[doc = ""]
17654#[doc = "ID: 89"]
17655#[derive(Debug, Clone, PartialEq)]
17656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17658#[cfg_attr(feature = "ts", derive(TS))]
17659#[cfg_attr(feature = "ts", ts(export))]
17660pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17661    #[doc = "Timestamp (time since system boot)."]
17662    pub time_boot_ms: u32,
17663    #[doc = "X Position"]
17664    pub x: f32,
17665    #[doc = "Y Position"]
17666    pub y: f32,
17667    #[doc = "Z Position"]
17668    pub z: f32,
17669    #[doc = "Roll"]
17670    pub roll: f32,
17671    #[doc = "Pitch"]
17672    pub pitch: f32,
17673    #[doc = "Yaw"]
17674    pub yaw: f32,
17675}
17676impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17677    pub const ENCODED_LEN: usize = 28usize;
17678    pub const DEFAULT: Self = Self {
17679        time_boot_ms: 0_u32,
17680        x: 0.0_f32,
17681        y: 0.0_f32,
17682        z: 0.0_f32,
17683        roll: 0.0_f32,
17684        pitch: 0.0_f32,
17685        yaw: 0.0_f32,
17686    };
17687    #[cfg(feature = "arbitrary")]
17688    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17689        use arbitrary::{Arbitrary, Unstructured};
17690        let mut buf = [0u8; 1024];
17691        rng.fill_bytes(&mut buf);
17692        let mut unstructured = Unstructured::new(&buf);
17693        Self::arbitrary(&mut unstructured).unwrap_or_default()
17694    }
17695}
17696impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17697    fn default() -> Self {
17698        Self::DEFAULT.clone()
17699    }
17700}
17701impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17702    type Message = MavMessage;
17703    const ID: u32 = 89u32;
17704    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17705    const EXTRA_CRC: u8 = 231u8;
17706    const ENCODED_LEN: usize = 28usize;
17707    fn deser(
17708        _version: MavlinkVersion,
17709        __input: &[u8],
17710    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17711        let avail_len = __input.len();
17712        let mut payload_buf = [0; Self::ENCODED_LEN];
17713        let mut buf = if avail_len < Self::ENCODED_LEN {
17714            payload_buf[0..avail_len].copy_from_slice(__input);
17715            Bytes::new(&payload_buf)
17716        } else {
17717            Bytes::new(__input)
17718        };
17719        let mut __struct = Self::default();
17720        __struct.time_boot_ms = buf.get_u32_le()?;
17721        __struct.x = buf.get_f32_le()?;
17722        __struct.y = buf.get_f32_le()?;
17723        __struct.z = buf.get_f32_le()?;
17724        __struct.roll = buf.get_f32_le()?;
17725        __struct.pitch = buf.get_f32_le()?;
17726        __struct.yaw = buf.get_f32_le()?;
17727        Ok(__struct)
17728    }
17729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17730        let mut __tmp = BytesMut::new(bytes);
17731        #[allow(clippy::absurd_extreme_comparisons)]
17732        #[allow(unused_comparisons)]
17733        if __tmp.remaining() < Self::ENCODED_LEN {
17734            panic!(
17735                "buffer is too small (need {} bytes, but got {})",
17736                Self::ENCODED_LEN,
17737                __tmp.remaining(),
17738            )
17739        }
17740        __tmp.put_u32_le(self.time_boot_ms);
17741        __tmp.put_f32_le(self.x);
17742        __tmp.put_f32_le(self.y);
17743        __tmp.put_f32_le(self.z);
17744        __tmp.put_f32_le(self.roll);
17745        __tmp.put_f32_le(self.pitch);
17746        __tmp.put_f32_le(self.yaw);
17747        if matches!(version, MavlinkVersion::V2) {
17748            let len = __tmp.len();
17749            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17750        } else {
17751            __tmp.len()
17752        }
17753    }
17754}
17755#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17756#[doc = ""]
17757#[doc = "ID: 268"]
17758#[derive(Debug, Clone, PartialEq)]
17759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17761#[cfg_attr(feature = "ts", derive(TS))]
17762#[cfg_attr(feature = "ts", ts(export))]
17763pub struct LOGGING_ACK_DATA {
17764    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17765    pub sequence: u16,
17766    #[doc = "system ID of the target"]
17767    pub target_system: u8,
17768    #[doc = "component ID of the target"]
17769    pub target_component: u8,
17770}
17771impl LOGGING_ACK_DATA {
17772    pub const ENCODED_LEN: usize = 4usize;
17773    pub const DEFAULT: Self = Self {
17774        sequence: 0_u16,
17775        target_system: 0_u8,
17776        target_component: 0_u8,
17777    };
17778    #[cfg(feature = "arbitrary")]
17779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17780        use arbitrary::{Arbitrary, Unstructured};
17781        let mut buf = [0u8; 1024];
17782        rng.fill_bytes(&mut buf);
17783        let mut unstructured = Unstructured::new(&buf);
17784        Self::arbitrary(&mut unstructured).unwrap_or_default()
17785    }
17786}
17787impl Default for LOGGING_ACK_DATA {
17788    fn default() -> Self {
17789        Self::DEFAULT.clone()
17790    }
17791}
17792impl MessageData for LOGGING_ACK_DATA {
17793    type Message = MavMessage;
17794    const ID: u32 = 268u32;
17795    const NAME: &'static str = "LOGGING_ACK";
17796    const EXTRA_CRC: u8 = 14u8;
17797    const ENCODED_LEN: usize = 4usize;
17798    fn deser(
17799        _version: MavlinkVersion,
17800        __input: &[u8],
17801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17802        let avail_len = __input.len();
17803        let mut payload_buf = [0; Self::ENCODED_LEN];
17804        let mut buf = if avail_len < Self::ENCODED_LEN {
17805            payload_buf[0..avail_len].copy_from_slice(__input);
17806            Bytes::new(&payload_buf)
17807        } else {
17808            Bytes::new(__input)
17809        };
17810        let mut __struct = Self::default();
17811        __struct.sequence = buf.get_u16_le()?;
17812        __struct.target_system = buf.get_u8()?;
17813        __struct.target_component = buf.get_u8()?;
17814        Ok(__struct)
17815    }
17816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17817        let mut __tmp = BytesMut::new(bytes);
17818        #[allow(clippy::absurd_extreme_comparisons)]
17819        #[allow(unused_comparisons)]
17820        if __tmp.remaining() < Self::ENCODED_LEN {
17821            panic!(
17822                "buffer is too small (need {} bytes, but got {})",
17823                Self::ENCODED_LEN,
17824                __tmp.remaining(),
17825            )
17826        }
17827        __tmp.put_u16_le(self.sequence);
17828        __tmp.put_u8(self.target_system);
17829        __tmp.put_u8(self.target_component);
17830        if matches!(version, MavlinkVersion::V2) {
17831            let len = __tmp.len();
17832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17833        } else {
17834            __tmp.len()
17835        }
17836    }
17837}
17838#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17839#[doc = ""]
17840#[doc = "ID: 266"]
17841#[derive(Debug, Clone, PartialEq)]
17842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17844#[cfg_attr(feature = "ts", derive(TS))]
17845#[cfg_attr(feature = "ts", ts(export))]
17846pub struct LOGGING_DATA_DATA {
17847    #[doc = "sequence number (can wrap)"]
17848    pub sequence: u16,
17849    #[doc = "system ID of the target"]
17850    pub target_system: u8,
17851    #[doc = "component ID of the target"]
17852    pub target_component: u8,
17853    #[doc = "data length"]
17854    pub length: u8,
17855    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17856    pub first_message_offset: u8,
17857    #[doc = "logged data"]
17858    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17859    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17860    pub data: [u8; 249],
17861}
17862impl LOGGING_DATA_DATA {
17863    pub const ENCODED_LEN: usize = 255usize;
17864    pub const DEFAULT: Self = Self {
17865        sequence: 0_u16,
17866        target_system: 0_u8,
17867        target_component: 0_u8,
17868        length: 0_u8,
17869        first_message_offset: 0_u8,
17870        data: [0_u8; 249usize],
17871    };
17872    #[cfg(feature = "arbitrary")]
17873    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17874        use arbitrary::{Arbitrary, Unstructured};
17875        let mut buf = [0u8; 1024];
17876        rng.fill_bytes(&mut buf);
17877        let mut unstructured = Unstructured::new(&buf);
17878        Self::arbitrary(&mut unstructured).unwrap_or_default()
17879    }
17880}
17881impl Default for LOGGING_DATA_DATA {
17882    fn default() -> Self {
17883        Self::DEFAULT.clone()
17884    }
17885}
17886impl MessageData for LOGGING_DATA_DATA {
17887    type Message = MavMessage;
17888    const ID: u32 = 266u32;
17889    const NAME: &'static str = "LOGGING_DATA";
17890    const EXTRA_CRC: u8 = 193u8;
17891    const ENCODED_LEN: usize = 255usize;
17892    fn deser(
17893        _version: MavlinkVersion,
17894        __input: &[u8],
17895    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17896        let avail_len = __input.len();
17897        let mut payload_buf = [0; Self::ENCODED_LEN];
17898        let mut buf = if avail_len < Self::ENCODED_LEN {
17899            payload_buf[0..avail_len].copy_from_slice(__input);
17900            Bytes::new(&payload_buf)
17901        } else {
17902            Bytes::new(__input)
17903        };
17904        let mut __struct = Self::default();
17905        __struct.sequence = buf.get_u16_le()?;
17906        __struct.target_system = buf.get_u8()?;
17907        __struct.target_component = buf.get_u8()?;
17908        __struct.length = buf.get_u8()?;
17909        __struct.first_message_offset = buf.get_u8()?;
17910        for v in &mut __struct.data {
17911            let val = buf.get_u8()?;
17912            *v = val;
17913        }
17914        Ok(__struct)
17915    }
17916    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17917        let mut __tmp = BytesMut::new(bytes);
17918        #[allow(clippy::absurd_extreme_comparisons)]
17919        #[allow(unused_comparisons)]
17920        if __tmp.remaining() < Self::ENCODED_LEN {
17921            panic!(
17922                "buffer is too small (need {} bytes, but got {})",
17923                Self::ENCODED_LEN,
17924                __tmp.remaining(),
17925            )
17926        }
17927        __tmp.put_u16_le(self.sequence);
17928        __tmp.put_u8(self.target_system);
17929        __tmp.put_u8(self.target_component);
17930        __tmp.put_u8(self.length);
17931        __tmp.put_u8(self.first_message_offset);
17932        for val in &self.data {
17933            __tmp.put_u8(*val);
17934        }
17935        if matches!(version, MavlinkVersion::V2) {
17936            let len = __tmp.len();
17937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17938        } else {
17939            __tmp.len()
17940        }
17941    }
17942}
17943#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17944#[doc = ""]
17945#[doc = "ID: 267"]
17946#[derive(Debug, Clone, PartialEq)]
17947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17949#[cfg_attr(feature = "ts", derive(TS))]
17950#[cfg_attr(feature = "ts", ts(export))]
17951pub struct LOGGING_DATA_ACKED_DATA {
17952    #[doc = "sequence number (can wrap)"]
17953    pub sequence: u16,
17954    #[doc = "system ID of the target"]
17955    pub target_system: u8,
17956    #[doc = "component ID of the target"]
17957    pub target_component: u8,
17958    #[doc = "data length"]
17959    pub length: u8,
17960    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17961    pub first_message_offset: u8,
17962    #[doc = "logged data"]
17963    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17964    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17965    pub data: [u8; 249],
17966}
17967impl LOGGING_DATA_ACKED_DATA {
17968    pub const ENCODED_LEN: usize = 255usize;
17969    pub const DEFAULT: Self = Self {
17970        sequence: 0_u16,
17971        target_system: 0_u8,
17972        target_component: 0_u8,
17973        length: 0_u8,
17974        first_message_offset: 0_u8,
17975        data: [0_u8; 249usize],
17976    };
17977    #[cfg(feature = "arbitrary")]
17978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17979        use arbitrary::{Arbitrary, Unstructured};
17980        let mut buf = [0u8; 1024];
17981        rng.fill_bytes(&mut buf);
17982        let mut unstructured = Unstructured::new(&buf);
17983        Self::arbitrary(&mut unstructured).unwrap_or_default()
17984    }
17985}
17986impl Default for LOGGING_DATA_ACKED_DATA {
17987    fn default() -> Self {
17988        Self::DEFAULT.clone()
17989    }
17990}
17991impl MessageData for LOGGING_DATA_ACKED_DATA {
17992    type Message = MavMessage;
17993    const ID: u32 = 267u32;
17994    const NAME: &'static str = "LOGGING_DATA_ACKED";
17995    const EXTRA_CRC: u8 = 35u8;
17996    const ENCODED_LEN: usize = 255usize;
17997    fn deser(
17998        _version: MavlinkVersion,
17999        __input: &[u8],
18000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18001        let avail_len = __input.len();
18002        let mut payload_buf = [0; Self::ENCODED_LEN];
18003        let mut buf = if avail_len < Self::ENCODED_LEN {
18004            payload_buf[0..avail_len].copy_from_slice(__input);
18005            Bytes::new(&payload_buf)
18006        } else {
18007            Bytes::new(__input)
18008        };
18009        let mut __struct = Self::default();
18010        __struct.sequence = buf.get_u16_le()?;
18011        __struct.target_system = buf.get_u8()?;
18012        __struct.target_component = buf.get_u8()?;
18013        __struct.length = buf.get_u8()?;
18014        __struct.first_message_offset = buf.get_u8()?;
18015        for v in &mut __struct.data {
18016            let val = buf.get_u8()?;
18017            *v = val;
18018        }
18019        Ok(__struct)
18020    }
18021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18022        let mut __tmp = BytesMut::new(bytes);
18023        #[allow(clippy::absurd_extreme_comparisons)]
18024        #[allow(unused_comparisons)]
18025        if __tmp.remaining() < Self::ENCODED_LEN {
18026            panic!(
18027                "buffer is too small (need {} bytes, but got {})",
18028                Self::ENCODED_LEN,
18029                __tmp.remaining(),
18030            )
18031        }
18032        __tmp.put_u16_le(self.sequence);
18033        __tmp.put_u8(self.target_system);
18034        __tmp.put_u8(self.target_component);
18035        __tmp.put_u8(self.length);
18036        __tmp.put_u8(self.first_message_offset);
18037        for val in &self.data {
18038            __tmp.put_u8(*val);
18039        }
18040        if matches!(version, MavlinkVersion::V2) {
18041            let len = __tmp.len();
18042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18043        } else {
18044            __tmp.len()
18045        }
18046    }
18047}
18048#[doc = "Reply to LOG_REQUEST_DATA."]
18049#[doc = ""]
18050#[doc = "ID: 120"]
18051#[derive(Debug, Clone, PartialEq)]
18052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18054#[cfg_attr(feature = "ts", derive(TS))]
18055#[cfg_attr(feature = "ts", ts(export))]
18056pub struct LOG_DATA_DATA {
18057    #[doc = "Offset into the log"]
18058    pub ofs: u32,
18059    #[doc = "Log id (from LOG_ENTRY reply)"]
18060    pub id: u16,
18061    #[doc = "Number of bytes (zero for end of log)"]
18062    pub count: u8,
18063    #[doc = "log data"]
18064    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18065    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18066    pub data: [u8; 90],
18067}
18068impl LOG_DATA_DATA {
18069    pub const ENCODED_LEN: usize = 97usize;
18070    pub const DEFAULT: Self = Self {
18071        ofs: 0_u32,
18072        id: 0_u16,
18073        count: 0_u8,
18074        data: [0_u8; 90usize],
18075    };
18076    #[cfg(feature = "arbitrary")]
18077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18078        use arbitrary::{Arbitrary, Unstructured};
18079        let mut buf = [0u8; 1024];
18080        rng.fill_bytes(&mut buf);
18081        let mut unstructured = Unstructured::new(&buf);
18082        Self::arbitrary(&mut unstructured).unwrap_or_default()
18083    }
18084}
18085impl Default for LOG_DATA_DATA {
18086    fn default() -> Self {
18087        Self::DEFAULT.clone()
18088    }
18089}
18090impl MessageData for LOG_DATA_DATA {
18091    type Message = MavMessage;
18092    const ID: u32 = 120u32;
18093    const NAME: &'static str = "LOG_DATA";
18094    const EXTRA_CRC: u8 = 134u8;
18095    const ENCODED_LEN: usize = 97usize;
18096    fn deser(
18097        _version: MavlinkVersion,
18098        __input: &[u8],
18099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18100        let avail_len = __input.len();
18101        let mut payload_buf = [0; Self::ENCODED_LEN];
18102        let mut buf = if avail_len < Self::ENCODED_LEN {
18103            payload_buf[0..avail_len].copy_from_slice(__input);
18104            Bytes::new(&payload_buf)
18105        } else {
18106            Bytes::new(__input)
18107        };
18108        let mut __struct = Self::default();
18109        __struct.ofs = buf.get_u32_le()?;
18110        __struct.id = buf.get_u16_le()?;
18111        __struct.count = buf.get_u8()?;
18112        for v in &mut __struct.data {
18113            let val = buf.get_u8()?;
18114            *v = val;
18115        }
18116        Ok(__struct)
18117    }
18118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18119        let mut __tmp = BytesMut::new(bytes);
18120        #[allow(clippy::absurd_extreme_comparisons)]
18121        #[allow(unused_comparisons)]
18122        if __tmp.remaining() < Self::ENCODED_LEN {
18123            panic!(
18124                "buffer is too small (need {} bytes, but got {})",
18125                Self::ENCODED_LEN,
18126                __tmp.remaining(),
18127            )
18128        }
18129        __tmp.put_u32_le(self.ofs);
18130        __tmp.put_u16_le(self.id);
18131        __tmp.put_u8(self.count);
18132        for val in &self.data {
18133            __tmp.put_u8(*val);
18134        }
18135        if matches!(version, MavlinkVersion::V2) {
18136            let len = __tmp.len();
18137            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18138        } else {
18139            __tmp.len()
18140        }
18141    }
18142}
18143#[doc = "Reply to LOG_REQUEST_LIST."]
18144#[doc = ""]
18145#[doc = "ID: 118"]
18146#[derive(Debug, Clone, PartialEq)]
18147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18149#[cfg_attr(feature = "ts", derive(TS))]
18150#[cfg_attr(feature = "ts", ts(export))]
18151pub struct LOG_ENTRY_DATA {
18152    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18153    pub time_utc: u32,
18154    #[doc = "Size of the log (may be approximate)"]
18155    pub size: u32,
18156    #[doc = "Log id"]
18157    pub id: u16,
18158    #[doc = "Total number of logs"]
18159    pub num_logs: u16,
18160    #[doc = "High log number"]
18161    pub last_log_num: u16,
18162}
18163impl LOG_ENTRY_DATA {
18164    pub const ENCODED_LEN: usize = 14usize;
18165    pub const DEFAULT: Self = Self {
18166        time_utc: 0_u32,
18167        size: 0_u32,
18168        id: 0_u16,
18169        num_logs: 0_u16,
18170        last_log_num: 0_u16,
18171    };
18172    #[cfg(feature = "arbitrary")]
18173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18174        use arbitrary::{Arbitrary, Unstructured};
18175        let mut buf = [0u8; 1024];
18176        rng.fill_bytes(&mut buf);
18177        let mut unstructured = Unstructured::new(&buf);
18178        Self::arbitrary(&mut unstructured).unwrap_or_default()
18179    }
18180}
18181impl Default for LOG_ENTRY_DATA {
18182    fn default() -> Self {
18183        Self::DEFAULT.clone()
18184    }
18185}
18186impl MessageData for LOG_ENTRY_DATA {
18187    type Message = MavMessage;
18188    const ID: u32 = 118u32;
18189    const NAME: &'static str = "LOG_ENTRY";
18190    const EXTRA_CRC: u8 = 56u8;
18191    const ENCODED_LEN: usize = 14usize;
18192    fn deser(
18193        _version: MavlinkVersion,
18194        __input: &[u8],
18195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18196        let avail_len = __input.len();
18197        let mut payload_buf = [0; Self::ENCODED_LEN];
18198        let mut buf = if avail_len < Self::ENCODED_LEN {
18199            payload_buf[0..avail_len].copy_from_slice(__input);
18200            Bytes::new(&payload_buf)
18201        } else {
18202            Bytes::new(__input)
18203        };
18204        let mut __struct = Self::default();
18205        __struct.time_utc = buf.get_u32_le()?;
18206        __struct.size = buf.get_u32_le()?;
18207        __struct.id = buf.get_u16_le()?;
18208        __struct.num_logs = buf.get_u16_le()?;
18209        __struct.last_log_num = buf.get_u16_le()?;
18210        Ok(__struct)
18211    }
18212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18213        let mut __tmp = BytesMut::new(bytes);
18214        #[allow(clippy::absurd_extreme_comparisons)]
18215        #[allow(unused_comparisons)]
18216        if __tmp.remaining() < Self::ENCODED_LEN {
18217            panic!(
18218                "buffer is too small (need {} bytes, but got {})",
18219                Self::ENCODED_LEN,
18220                __tmp.remaining(),
18221            )
18222        }
18223        __tmp.put_u32_le(self.time_utc);
18224        __tmp.put_u32_le(self.size);
18225        __tmp.put_u16_le(self.id);
18226        __tmp.put_u16_le(self.num_logs);
18227        __tmp.put_u16_le(self.last_log_num);
18228        if matches!(version, MavlinkVersion::V2) {
18229            let len = __tmp.len();
18230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18231        } else {
18232            __tmp.len()
18233        }
18234    }
18235}
18236#[doc = "Erase all logs."]
18237#[doc = ""]
18238#[doc = "ID: 121"]
18239#[derive(Debug, Clone, PartialEq)]
18240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18241#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18242#[cfg_attr(feature = "ts", derive(TS))]
18243#[cfg_attr(feature = "ts", ts(export))]
18244pub struct LOG_ERASE_DATA {
18245    #[doc = "System ID"]
18246    pub target_system: u8,
18247    #[doc = "Component ID"]
18248    pub target_component: u8,
18249}
18250impl LOG_ERASE_DATA {
18251    pub const ENCODED_LEN: usize = 2usize;
18252    pub const DEFAULT: Self = Self {
18253        target_system: 0_u8,
18254        target_component: 0_u8,
18255    };
18256    #[cfg(feature = "arbitrary")]
18257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18258        use arbitrary::{Arbitrary, Unstructured};
18259        let mut buf = [0u8; 1024];
18260        rng.fill_bytes(&mut buf);
18261        let mut unstructured = Unstructured::new(&buf);
18262        Self::arbitrary(&mut unstructured).unwrap_or_default()
18263    }
18264}
18265impl Default for LOG_ERASE_DATA {
18266    fn default() -> Self {
18267        Self::DEFAULT.clone()
18268    }
18269}
18270impl MessageData for LOG_ERASE_DATA {
18271    type Message = MavMessage;
18272    const ID: u32 = 121u32;
18273    const NAME: &'static str = "LOG_ERASE";
18274    const EXTRA_CRC: u8 = 237u8;
18275    const ENCODED_LEN: usize = 2usize;
18276    fn deser(
18277        _version: MavlinkVersion,
18278        __input: &[u8],
18279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18280        let avail_len = __input.len();
18281        let mut payload_buf = [0; Self::ENCODED_LEN];
18282        let mut buf = if avail_len < Self::ENCODED_LEN {
18283            payload_buf[0..avail_len].copy_from_slice(__input);
18284            Bytes::new(&payload_buf)
18285        } else {
18286            Bytes::new(__input)
18287        };
18288        let mut __struct = Self::default();
18289        __struct.target_system = buf.get_u8()?;
18290        __struct.target_component = buf.get_u8()?;
18291        Ok(__struct)
18292    }
18293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18294        let mut __tmp = BytesMut::new(bytes);
18295        #[allow(clippy::absurd_extreme_comparisons)]
18296        #[allow(unused_comparisons)]
18297        if __tmp.remaining() < Self::ENCODED_LEN {
18298            panic!(
18299                "buffer is too small (need {} bytes, but got {})",
18300                Self::ENCODED_LEN,
18301                __tmp.remaining(),
18302            )
18303        }
18304        __tmp.put_u8(self.target_system);
18305        __tmp.put_u8(self.target_component);
18306        if matches!(version, MavlinkVersion::V2) {
18307            let len = __tmp.len();
18308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18309        } else {
18310            __tmp.len()
18311        }
18312    }
18313}
18314#[doc = "Request a chunk of a log."]
18315#[doc = ""]
18316#[doc = "ID: 119"]
18317#[derive(Debug, Clone, PartialEq)]
18318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18320#[cfg_attr(feature = "ts", derive(TS))]
18321#[cfg_attr(feature = "ts", ts(export))]
18322pub struct LOG_REQUEST_DATA_DATA {
18323    #[doc = "Offset into the log"]
18324    pub ofs: u32,
18325    #[doc = "Number of bytes"]
18326    pub count: u32,
18327    #[doc = "Log id (from LOG_ENTRY reply)"]
18328    pub id: u16,
18329    #[doc = "System ID"]
18330    pub target_system: u8,
18331    #[doc = "Component ID"]
18332    pub target_component: u8,
18333}
18334impl LOG_REQUEST_DATA_DATA {
18335    pub const ENCODED_LEN: usize = 12usize;
18336    pub const DEFAULT: Self = Self {
18337        ofs: 0_u32,
18338        count: 0_u32,
18339        id: 0_u16,
18340        target_system: 0_u8,
18341        target_component: 0_u8,
18342    };
18343    #[cfg(feature = "arbitrary")]
18344    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18345        use arbitrary::{Arbitrary, Unstructured};
18346        let mut buf = [0u8; 1024];
18347        rng.fill_bytes(&mut buf);
18348        let mut unstructured = Unstructured::new(&buf);
18349        Self::arbitrary(&mut unstructured).unwrap_or_default()
18350    }
18351}
18352impl Default for LOG_REQUEST_DATA_DATA {
18353    fn default() -> Self {
18354        Self::DEFAULT.clone()
18355    }
18356}
18357impl MessageData for LOG_REQUEST_DATA_DATA {
18358    type Message = MavMessage;
18359    const ID: u32 = 119u32;
18360    const NAME: &'static str = "LOG_REQUEST_DATA";
18361    const EXTRA_CRC: u8 = 116u8;
18362    const ENCODED_LEN: usize = 12usize;
18363    fn deser(
18364        _version: MavlinkVersion,
18365        __input: &[u8],
18366    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18367        let avail_len = __input.len();
18368        let mut payload_buf = [0; Self::ENCODED_LEN];
18369        let mut buf = if avail_len < Self::ENCODED_LEN {
18370            payload_buf[0..avail_len].copy_from_slice(__input);
18371            Bytes::new(&payload_buf)
18372        } else {
18373            Bytes::new(__input)
18374        };
18375        let mut __struct = Self::default();
18376        __struct.ofs = buf.get_u32_le()?;
18377        __struct.count = buf.get_u32_le()?;
18378        __struct.id = buf.get_u16_le()?;
18379        __struct.target_system = buf.get_u8()?;
18380        __struct.target_component = buf.get_u8()?;
18381        Ok(__struct)
18382    }
18383    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18384        let mut __tmp = BytesMut::new(bytes);
18385        #[allow(clippy::absurd_extreme_comparisons)]
18386        #[allow(unused_comparisons)]
18387        if __tmp.remaining() < Self::ENCODED_LEN {
18388            panic!(
18389                "buffer is too small (need {} bytes, but got {})",
18390                Self::ENCODED_LEN,
18391                __tmp.remaining(),
18392            )
18393        }
18394        __tmp.put_u32_le(self.ofs);
18395        __tmp.put_u32_le(self.count);
18396        __tmp.put_u16_le(self.id);
18397        __tmp.put_u8(self.target_system);
18398        __tmp.put_u8(self.target_component);
18399        if matches!(version, MavlinkVersion::V2) {
18400            let len = __tmp.len();
18401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18402        } else {
18403            __tmp.len()
18404        }
18405    }
18406}
18407#[doc = "Stop log transfer and resume normal logging."]
18408#[doc = ""]
18409#[doc = "ID: 122"]
18410#[derive(Debug, Clone, PartialEq)]
18411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18413#[cfg_attr(feature = "ts", derive(TS))]
18414#[cfg_attr(feature = "ts", ts(export))]
18415pub struct LOG_REQUEST_END_DATA {
18416    #[doc = "System ID"]
18417    pub target_system: u8,
18418    #[doc = "Component ID"]
18419    pub target_component: u8,
18420}
18421impl LOG_REQUEST_END_DATA {
18422    pub const ENCODED_LEN: usize = 2usize;
18423    pub const DEFAULT: Self = Self {
18424        target_system: 0_u8,
18425        target_component: 0_u8,
18426    };
18427    #[cfg(feature = "arbitrary")]
18428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18429        use arbitrary::{Arbitrary, Unstructured};
18430        let mut buf = [0u8; 1024];
18431        rng.fill_bytes(&mut buf);
18432        let mut unstructured = Unstructured::new(&buf);
18433        Self::arbitrary(&mut unstructured).unwrap_or_default()
18434    }
18435}
18436impl Default for LOG_REQUEST_END_DATA {
18437    fn default() -> Self {
18438        Self::DEFAULT.clone()
18439    }
18440}
18441impl MessageData for LOG_REQUEST_END_DATA {
18442    type Message = MavMessage;
18443    const ID: u32 = 122u32;
18444    const NAME: &'static str = "LOG_REQUEST_END";
18445    const EXTRA_CRC: u8 = 203u8;
18446    const ENCODED_LEN: usize = 2usize;
18447    fn deser(
18448        _version: MavlinkVersion,
18449        __input: &[u8],
18450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18451        let avail_len = __input.len();
18452        let mut payload_buf = [0; Self::ENCODED_LEN];
18453        let mut buf = if avail_len < Self::ENCODED_LEN {
18454            payload_buf[0..avail_len].copy_from_slice(__input);
18455            Bytes::new(&payload_buf)
18456        } else {
18457            Bytes::new(__input)
18458        };
18459        let mut __struct = Self::default();
18460        __struct.target_system = buf.get_u8()?;
18461        __struct.target_component = buf.get_u8()?;
18462        Ok(__struct)
18463    }
18464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18465        let mut __tmp = BytesMut::new(bytes);
18466        #[allow(clippy::absurd_extreme_comparisons)]
18467        #[allow(unused_comparisons)]
18468        if __tmp.remaining() < Self::ENCODED_LEN {
18469            panic!(
18470                "buffer is too small (need {} bytes, but got {})",
18471                Self::ENCODED_LEN,
18472                __tmp.remaining(),
18473            )
18474        }
18475        __tmp.put_u8(self.target_system);
18476        __tmp.put_u8(self.target_component);
18477        if matches!(version, MavlinkVersion::V2) {
18478            let len = __tmp.len();
18479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18480        } else {
18481            __tmp.len()
18482        }
18483    }
18484}
18485#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18486#[doc = ""]
18487#[doc = "ID: 117"]
18488#[derive(Debug, Clone, PartialEq)]
18489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18491#[cfg_attr(feature = "ts", derive(TS))]
18492#[cfg_attr(feature = "ts", ts(export))]
18493pub struct LOG_REQUEST_LIST_DATA {
18494    #[doc = "First log id (0 for first available)"]
18495    pub start: u16,
18496    #[doc = "Last log id (0xffff for last available)"]
18497    pub end: u16,
18498    #[doc = "System ID"]
18499    pub target_system: u8,
18500    #[doc = "Component ID"]
18501    pub target_component: u8,
18502}
18503impl LOG_REQUEST_LIST_DATA {
18504    pub const ENCODED_LEN: usize = 6usize;
18505    pub const DEFAULT: Self = Self {
18506        start: 0_u16,
18507        end: 0_u16,
18508        target_system: 0_u8,
18509        target_component: 0_u8,
18510    };
18511    #[cfg(feature = "arbitrary")]
18512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18513        use arbitrary::{Arbitrary, Unstructured};
18514        let mut buf = [0u8; 1024];
18515        rng.fill_bytes(&mut buf);
18516        let mut unstructured = Unstructured::new(&buf);
18517        Self::arbitrary(&mut unstructured).unwrap_or_default()
18518    }
18519}
18520impl Default for LOG_REQUEST_LIST_DATA {
18521    fn default() -> Self {
18522        Self::DEFAULT.clone()
18523    }
18524}
18525impl MessageData for LOG_REQUEST_LIST_DATA {
18526    type Message = MavMessage;
18527    const ID: u32 = 117u32;
18528    const NAME: &'static str = "LOG_REQUEST_LIST";
18529    const EXTRA_CRC: u8 = 128u8;
18530    const ENCODED_LEN: usize = 6usize;
18531    fn deser(
18532        _version: MavlinkVersion,
18533        __input: &[u8],
18534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18535        let avail_len = __input.len();
18536        let mut payload_buf = [0; Self::ENCODED_LEN];
18537        let mut buf = if avail_len < Self::ENCODED_LEN {
18538            payload_buf[0..avail_len].copy_from_slice(__input);
18539            Bytes::new(&payload_buf)
18540        } else {
18541            Bytes::new(__input)
18542        };
18543        let mut __struct = Self::default();
18544        __struct.start = buf.get_u16_le()?;
18545        __struct.end = buf.get_u16_le()?;
18546        __struct.target_system = buf.get_u8()?;
18547        __struct.target_component = buf.get_u8()?;
18548        Ok(__struct)
18549    }
18550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18551        let mut __tmp = BytesMut::new(bytes);
18552        #[allow(clippy::absurd_extreme_comparisons)]
18553        #[allow(unused_comparisons)]
18554        if __tmp.remaining() < Self::ENCODED_LEN {
18555            panic!(
18556                "buffer is too small (need {} bytes, but got {})",
18557                Self::ENCODED_LEN,
18558                __tmp.remaining(),
18559            )
18560        }
18561        __tmp.put_u16_le(self.start);
18562        __tmp.put_u16_le(self.end);
18563        __tmp.put_u8(self.target_system);
18564        __tmp.put_u8(self.target_component);
18565        if matches!(version, MavlinkVersion::V2) {
18566            let len = __tmp.len();
18567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18568        } else {
18569            __tmp.len()
18570        }
18571    }
18572}
18573#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18574#[doc = ""]
18575#[doc = "ID: 192"]
18576#[derive(Debug, Clone, PartialEq)]
18577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18579#[cfg_attr(feature = "ts", derive(TS))]
18580#[cfg_attr(feature = "ts", ts(export))]
18581pub struct MAG_CAL_REPORT_DATA {
18582    #[doc = "RMS milligauss residuals."]
18583    pub fitness: f32,
18584    #[doc = "X offset."]
18585    pub ofs_x: f32,
18586    #[doc = "Y offset."]
18587    pub ofs_y: f32,
18588    #[doc = "Z offset."]
18589    pub ofs_z: f32,
18590    #[doc = "X diagonal (matrix 11)."]
18591    pub diag_x: f32,
18592    #[doc = "Y diagonal (matrix 22)."]
18593    pub diag_y: f32,
18594    #[doc = "Z diagonal (matrix 33)."]
18595    pub diag_z: f32,
18596    #[doc = "X off-diagonal (matrix 12 and 21)."]
18597    pub offdiag_x: f32,
18598    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18599    pub offdiag_y: f32,
18600    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18601    pub offdiag_z: f32,
18602    #[doc = "Compass being calibrated."]
18603    pub compass_id: u8,
18604    #[doc = "Bitmask of compasses being calibrated."]
18605    pub cal_mask: u8,
18606    #[doc = "Calibration Status."]
18607    pub cal_status: MagCalStatus,
18608    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18609    pub autosaved: u8,
18610    #[doc = "Confidence in orientation (higher is better)."]
18611    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18612    pub orientation_confidence: f32,
18613    #[doc = "orientation before calibration."]
18614    #[cfg_attr(feature = "serde", serde(default))]
18615    pub old_orientation: MavSensorOrientation,
18616    #[doc = "orientation after calibration."]
18617    #[cfg_attr(feature = "serde", serde(default))]
18618    pub new_orientation: MavSensorOrientation,
18619    #[doc = "field radius correction factor"]
18620    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18621    pub scale_factor: f32,
18622}
18623impl MAG_CAL_REPORT_DATA {
18624    pub const ENCODED_LEN: usize = 54usize;
18625    pub const DEFAULT: Self = Self {
18626        fitness: 0.0_f32,
18627        ofs_x: 0.0_f32,
18628        ofs_y: 0.0_f32,
18629        ofs_z: 0.0_f32,
18630        diag_x: 0.0_f32,
18631        diag_y: 0.0_f32,
18632        diag_z: 0.0_f32,
18633        offdiag_x: 0.0_f32,
18634        offdiag_y: 0.0_f32,
18635        offdiag_z: 0.0_f32,
18636        compass_id: 0_u8,
18637        cal_mask: 0_u8,
18638        cal_status: MagCalStatus::DEFAULT,
18639        autosaved: 0_u8,
18640        orientation_confidence: 0.0_f32,
18641        old_orientation: MavSensorOrientation::DEFAULT,
18642        new_orientation: MavSensorOrientation::DEFAULT,
18643        scale_factor: 0.0_f32,
18644    };
18645    #[cfg(feature = "arbitrary")]
18646    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18647        use arbitrary::{Arbitrary, Unstructured};
18648        let mut buf = [0u8; 1024];
18649        rng.fill_bytes(&mut buf);
18650        let mut unstructured = Unstructured::new(&buf);
18651        Self::arbitrary(&mut unstructured).unwrap_or_default()
18652    }
18653}
18654impl Default for MAG_CAL_REPORT_DATA {
18655    fn default() -> Self {
18656        Self::DEFAULT.clone()
18657    }
18658}
18659impl MessageData for MAG_CAL_REPORT_DATA {
18660    type Message = MavMessage;
18661    const ID: u32 = 192u32;
18662    const NAME: &'static str = "MAG_CAL_REPORT";
18663    const EXTRA_CRC: u8 = 36u8;
18664    const ENCODED_LEN: usize = 54usize;
18665    fn deser(
18666        _version: MavlinkVersion,
18667        __input: &[u8],
18668    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18669        let avail_len = __input.len();
18670        let mut payload_buf = [0; Self::ENCODED_LEN];
18671        let mut buf = if avail_len < Self::ENCODED_LEN {
18672            payload_buf[0..avail_len].copy_from_slice(__input);
18673            Bytes::new(&payload_buf)
18674        } else {
18675            Bytes::new(__input)
18676        };
18677        let mut __struct = Self::default();
18678        __struct.fitness = buf.get_f32_le()?;
18679        __struct.ofs_x = buf.get_f32_le()?;
18680        __struct.ofs_y = buf.get_f32_le()?;
18681        __struct.ofs_z = buf.get_f32_le()?;
18682        __struct.diag_x = buf.get_f32_le()?;
18683        __struct.diag_y = buf.get_f32_le()?;
18684        __struct.diag_z = buf.get_f32_le()?;
18685        __struct.offdiag_x = buf.get_f32_le()?;
18686        __struct.offdiag_y = buf.get_f32_le()?;
18687        __struct.offdiag_z = buf.get_f32_le()?;
18688        __struct.compass_id = buf.get_u8()?;
18689        __struct.cal_mask = buf.get_u8()?;
18690        let tmp = buf.get_u8()?;
18691        __struct.cal_status =
18692            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18693                enum_type: "MagCalStatus",
18694                value: tmp as u64,
18695            })?;
18696        __struct.autosaved = buf.get_u8()?;
18697        __struct.orientation_confidence = buf.get_f32_le()?;
18698        let tmp = buf.get_u8()?;
18699        __struct.old_orientation =
18700            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18701                enum_type: "MavSensorOrientation",
18702                value: tmp as u64,
18703            })?;
18704        let tmp = buf.get_u8()?;
18705        __struct.new_orientation =
18706            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18707                enum_type: "MavSensorOrientation",
18708                value: tmp as u64,
18709            })?;
18710        __struct.scale_factor = buf.get_f32_le()?;
18711        Ok(__struct)
18712    }
18713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18714        let mut __tmp = BytesMut::new(bytes);
18715        #[allow(clippy::absurd_extreme_comparisons)]
18716        #[allow(unused_comparisons)]
18717        if __tmp.remaining() < Self::ENCODED_LEN {
18718            panic!(
18719                "buffer is too small (need {} bytes, but got {})",
18720                Self::ENCODED_LEN,
18721                __tmp.remaining(),
18722            )
18723        }
18724        __tmp.put_f32_le(self.fitness);
18725        __tmp.put_f32_le(self.ofs_x);
18726        __tmp.put_f32_le(self.ofs_y);
18727        __tmp.put_f32_le(self.ofs_z);
18728        __tmp.put_f32_le(self.diag_x);
18729        __tmp.put_f32_le(self.diag_y);
18730        __tmp.put_f32_le(self.diag_z);
18731        __tmp.put_f32_le(self.offdiag_x);
18732        __tmp.put_f32_le(self.offdiag_y);
18733        __tmp.put_f32_le(self.offdiag_z);
18734        __tmp.put_u8(self.compass_id);
18735        __tmp.put_u8(self.cal_mask);
18736        __tmp.put_u8(self.cal_status as u8);
18737        __tmp.put_u8(self.autosaved);
18738        if matches!(version, MavlinkVersion::V2) {
18739            __tmp.put_f32_le(self.orientation_confidence);
18740            __tmp.put_u8(self.old_orientation as u8);
18741            __tmp.put_u8(self.new_orientation as u8);
18742            __tmp.put_f32_le(self.scale_factor);
18743            let len = __tmp.len();
18744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18745        } else {
18746            __tmp.len()
18747        }
18748    }
18749}
18750#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18751#[doc = ""]
18752#[doc = "ID: 69"]
18753#[derive(Debug, Clone, PartialEq)]
18754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18756#[cfg_attr(feature = "ts", derive(TS))]
18757#[cfg_attr(feature = "ts", ts(export))]
18758pub struct MANUAL_CONTROL_DATA {
18759    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18760    pub x: i16,
18761    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18762    pub y: i16,
18763    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18764    pub z: i16,
18765    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18766    pub r: i16,
18767    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18768    pub buttons: u16,
18769    #[doc = "The system to be controlled."]
18770    pub target: u8,
18771    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18772    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18773    pub buttons2: u16,
18774    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18775    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18776    pub enabled_extensions: u8,
18777    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18778    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18779    pub s: i16,
18780    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18781    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18782    pub t: i16,
18783    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18784    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18785    pub aux1: i16,
18786    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18787    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18788    pub aux2: i16,
18789    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18790    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18791    pub aux3: i16,
18792    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18793    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18794    pub aux4: i16,
18795    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18796    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18797    pub aux5: i16,
18798    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18800    pub aux6: i16,
18801}
18802impl MANUAL_CONTROL_DATA {
18803    pub const ENCODED_LEN: usize = 30usize;
18804    pub const DEFAULT: Self = Self {
18805        x: 0_i16,
18806        y: 0_i16,
18807        z: 0_i16,
18808        r: 0_i16,
18809        buttons: 0_u16,
18810        target: 0_u8,
18811        buttons2: 0_u16,
18812        enabled_extensions: 0_u8,
18813        s: 0_i16,
18814        t: 0_i16,
18815        aux1: 0_i16,
18816        aux2: 0_i16,
18817        aux3: 0_i16,
18818        aux4: 0_i16,
18819        aux5: 0_i16,
18820        aux6: 0_i16,
18821    };
18822    #[cfg(feature = "arbitrary")]
18823    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18824        use arbitrary::{Arbitrary, Unstructured};
18825        let mut buf = [0u8; 1024];
18826        rng.fill_bytes(&mut buf);
18827        let mut unstructured = Unstructured::new(&buf);
18828        Self::arbitrary(&mut unstructured).unwrap_or_default()
18829    }
18830}
18831impl Default for MANUAL_CONTROL_DATA {
18832    fn default() -> Self {
18833        Self::DEFAULT.clone()
18834    }
18835}
18836impl MessageData for MANUAL_CONTROL_DATA {
18837    type Message = MavMessage;
18838    const ID: u32 = 69u32;
18839    const NAME: &'static str = "MANUAL_CONTROL";
18840    const EXTRA_CRC: u8 = 243u8;
18841    const ENCODED_LEN: usize = 30usize;
18842    fn deser(
18843        _version: MavlinkVersion,
18844        __input: &[u8],
18845    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18846        let avail_len = __input.len();
18847        let mut payload_buf = [0; Self::ENCODED_LEN];
18848        let mut buf = if avail_len < Self::ENCODED_LEN {
18849            payload_buf[0..avail_len].copy_from_slice(__input);
18850            Bytes::new(&payload_buf)
18851        } else {
18852            Bytes::new(__input)
18853        };
18854        let mut __struct = Self::default();
18855        __struct.x = buf.get_i16_le()?;
18856        __struct.y = buf.get_i16_le()?;
18857        __struct.z = buf.get_i16_le()?;
18858        __struct.r = buf.get_i16_le()?;
18859        __struct.buttons = buf.get_u16_le()?;
18860        __struct.target = buf.get_u8()?;
18861        __struct.buttons2 = buf.get_u16_le()?;
18862        __struct.enabled_extensions = buf.get_u8()?;
18863        __struct.s = buf.get_i16_le()?;
18864        __struct.t = buf.get_i16_le()?;
18865        __struct.aux1 = buf.get_i16_le()?;
18866        __struct.aux2 = buf.get_i16_le()?;
18867        __struct.aux3 = buf.get_i16_le()?;
18868        __struct.aux4 = buf.get_i16_le()?;
18869        __struct.aux5 = buf.get_i16_le()?;
18870        __struct.aux6 = buf.get_i16_le()?;
18871        Ok(__struct)
18872    }
18873    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18874        let mut __tmp = BytesMut::new(bytes);
18875        #[allow(clippy::absurd_extreme_comparisons)]
18876        #[allow(unused_comparisons)]
18877        if __tmp.remaining() < Self::ENCODED_LEN {
18878            panic!(
18879                "buffer is too small (need {} bytes, but got {})",
18880                Self::ENCODED_LEN,
18881                __tmp.remaining(),
18882            )
18883        }
18884        __tmp.put_i16_le(self.x);
18885        __tmp.put_i16_le(self.y);
18886        __tmp.put_i16_le(self.z);
18887        __tmp.put_i16_le(self.r);
18888        __tmp.put_u16_le(self.buttons);
18889        __tmp.put_u8(self.target);
18890        if matches!(version, MavlinkVersion::V2) {
18891            __tmp.put_u16_le(self.buttons2);
18892            __tmp.put_u8(self.enabled_extensions);
18893            __tmp.put_i16_le(self.s);
18894            __tmp.put_i16_le(self.t);
18895            __tmp.put_i16_le(self.aux1);
18896            __tmp.put_i16_le(self.aux2);
18897            __tmp.put_i16_le(self.aux3);
18898            __tmp.put_i16_le(self.aux4);
18899            __tmp.put_i16_le(self.aux5);
18900            __tmp.put_i16_le(self.aux6);
18901            let len = __tmp.len();
18902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18903        } else {
18904            __tmp.len()
18905        }
18906    }
18907}
18908#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18909#[doc = ""]
18910#[doc = "ID: 81"]
18911#[derive(Debug, Clone, PartialEq)]
18912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18914#[cfg_attr(feature = "ts", derive(TS))]
18915#[cfg_attr(feature = "ts", ts(export))]
18916pub struct MANUAL_SETPOINT_DATA {
18917    #[doc = "Timestamp (time since system boot)."]
18918    pub time_boot_ms: u32,
18919    #[doc = "Desired roll rate"]
18920    pub roll: f32,
18921    #[doc = "Desired pitch rate"]
18922    pub pitch: f32,
18923    #[doc = "Desired yaw rate"]
18924    pub yaw: f32,
18925    #[doc = "Collective thrust, normalized to 0 .. 1"]
18926    pub thrust: f32,
18927    #[doc = "Flight mode switch position, 0.. 255"]
18928    pub mode_switch: u8,
18929    #[doc = "Override mode switch position, 0.. 255"]
18930    pub manual_override_switch: u8,
18931}
18932impl MANUAL_SETPOINT_DATA {
18933    pub const ENCODED_LEN: usize = 22usize;
18934    pub const DEFAULT: Self = Self {
18935        time_boot_ms: 0_u32,
18936        roll: 0.0_f32,
18937        pitch: 0.0_f32,
18938        yaw: 0.0_f32,
18939        thrust: 0.0_f32,
18940        mode_switch: 0_u8,
18941        manual_override_switch: 0_u8,
18942    };
18943    #[cfg(feature = "arbitrary")]
18944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18945        use arbitrary::{Arbitrary, Unstructured};
18946        let mut buf = [0u8; 1024];
18947        rng.fill_bytes(&mut buf);
18948        let mut unstructured = Unstructured::new(&buf);
18949        Self::arbitrary(&mut unstructured).unwrap_or_default()
18950    }
18951}
18952impl Default for MANUAL_SETPOINT_DATA {
18953    fn default() -> Self {
18954        Self::DEFAULT.clone()
18955    }
18956}
18957impl MessageData for MANUAL_SETPOINT_DATA {
18958    type Message = MavMessage;
18959    const ID: u32 = 81u32;
18960    const NAME: &'static str = "MANUAL_SETPOINT";
18961    const EXTRA_CRC: u8 = 106u8;
18962    const ENCODED_LEN: usize = 22usize;
18963    fn deser(
18964        _version: MavlinkVersion,
18965        __input: &[u8],
18966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18967        let avail_len = __input.len();
18968        let mut payload_buf = [0; Self::ENCODED_LEN];
18969        let mut buf = if avail_len < Self::ENCODED_LEN {
18970            payload_buf[0..avail_len].copy_from_slice(__input);
18971            Bytes::new(&payload_buf)
18972        } else {
18973            Bytes::new(__input)
18974        };
18975        let mut __struct = Self::default();
18976        __struct.time_boot_ms = buf.get_u32_le()?;
18977        __struct.roll = buf.get_f32_le()?;
18978        __struct.pitch = buf.get_f32_le()?;
18979        __struct.yaw = buf.get_f32_le()?;
18980        __struct.thrust = buf.get_f32_le()?;
18981        __struct.mode_switch = buf.get_u8()?;
18982        __struct.manual_override_switch = buf.get_u8()?;
18983        Ok(__struct)
18984    }
18985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18986        let mut __tmp = BytesMut::new(bytes);
18987        #[allow(clippy::absurd_extreme_comparisons)]
18988        #[allow(unused_comparisons)]
18989        if __tmp.remaining() < Self::ENCODED_LEN {
18990            panic!(
18991                "buffer is too small (need {} bytes, but got {})",
18992                Self::ENCODED_LEN,
18993                __tmp.remaining(),
18994            )
18995        }
18996        __tmp.put_u32_le(self.time_boot_ms);
18997        __tmp.put_f32_le(self.roll);
18998        __tmp.put_f32_le(self.pitch);
18999        __tmp.put_f32_le(self.yaw);
19000        __tmp.put_f32_le(self.thrust);
19001        __tmp.put_u8(self.mode_switch);
19002        __tmp.put_u8(self.manual_override_switch);
19003        if matches!(version, MavlinkVersion::V2) {
19004            let len = __tmp.len();
19005            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19006        } else {
19007            __tmp.len()
19008        }
19009    }
19010}
19011#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19012#[doc = ""]
19013#[doc = "ID: 249"]
19014#[derive(Debug, Clone, PartialEq)]
19015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19017#[cfg_attr(feature = "ts", derive(TS))]
19018#[cfg_attr(feature = "ts", ts(export))]
19019pub struct MEMORY_VECT_DATA {
19020    #[doc = "Starting address of the debug variables"]
19021    pub address: u16,
19022    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19023    pub ver: u8,
19024    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19025    pub mavtype: u8,
19026    #[doc = "Memory contents at specified address"]
19027    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19028    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19029    pub value: [i8; 32],
19030}
19031impl MEMORY_VECT_DATA {
19032    pub const ENCODED_LEN: usize = 36usize;
19033    pub const DEFAULT: Self = Self {
19034        address: 0_u16,
19035        ver: 0_u8,
19036        mavtype: 0_u8,
19037        value: [0_i8; 32usize],
19038    };
19039    #[cfg(feature = "arbitrary")]
19040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19041        use arbitrary::{Arbitrary, Unstructured};
19042        let mut buf = [0u8; 1024];
19043        rng.fill_bytes(&mut buf);
19044        let mut unstructured = Unstructured::new(&buf);
19045        Self::arbitrary(&mut unstructured).unwrap_or_default()
19046    }
19047}
19048impl Default for MEMORY_VECT_DATA {
19049    fn default() -> Self {
19050        Self::DEFAULT.clone()
19051    }
19052}
19053impl MessageData for MEMORY_VECT_DATA {
19054    type Message = MavMessage;
19055    const ID: u32 = 249u32;
19056    const NAME: &'static str = "MEMORY_VECT";
19057    const EXTRA_CRC: u8 = 204u8;
19058    const ENCODED_LEN: usize = 36usize;
19059    fn deser(
19060        _version: MavlinkVersion,
19061        __input: &[u8],
19062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19063        let avail_len = __input.len();
19064        let mut payload_buf = [0; Self::ENCODED_LEN];
19065        let mut buf = if avail_len < Self::ENCODED_LEN {
19066            payload_buf[0..avail_len].copy_from_slice(__input);
19067            Bytes::new(&payload_buf)
19068        } else {
19069            Bytes::new(__input)
19070        };
19071        let mut __struct = Self::default();
19072        __struct.address = buf.get_u16_le()?;
19073        __struct.ver = buf.get_u8()?;
19074        __struct.mavtype = buf.get_u8()?;
19075        for v in &mut __struct.value {
19076            let val = buf.get_i8()?;
19077            *v = val;
19078        }
19079        Ok(__struct)
19080    }
19081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19082        let mut __tmp = BytesMut::new(bytes);
19083        #[allow(clippy::absurd_extreme_comparisons)]
19084        #[allow(unused_comparisons)]
19085        if __tmp.remaining() < Self::ENCODED_LEN {
19086            panic!(
19087                "buffer is too small (need {} bytes, but got {})",
19088                Self::ENCODED_LEN,
19089                __tmp.remaining(),
19090            )
19091        }
19092        __tmp.put_u16_le(self.address);
19093        __tmp.put_u8(self.ver);
19094        __tmp.put_u8(self.mavtype);
19095        for val in &self.value {
19096            __tmp.put_i8(*val);
19097        }
19098        if matches!(version, MavlinkVersion::V2) {
19099            let len = __tmp.len();
19100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19101        } else {
19102            __tmp.len()
19103        }
19104    }
19105}
19106#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19107#[doc = ""]
19108#[doc = "ID: 244"]
19109#[derive(Debug, Clone, PartialEq)]
19110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19112#[cfg_attr(feature = "ts", derive(TS))]
19113#[cfg_attr(feature = "ts", ts(export))]
19114pub struct MESSAGE_INTERVAL_DATA {
19115    #[doc = "0 indicates the interval at which it is sent."]
19116    pub interval_us: i32,
19117    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19118    pub message_id: u16,
19119}
19120impl MESSAGE_INTERVAL_DATA {
19121    pub const ENCODED_LEN: usize = 6usize;
19122    pub const DEFAULT: Self = Self {
19123        interval_us: 0_i32,
19124        message_id: 0_u16,
19125    };
19126    #[cfg(feature = "arbitrary")]
19127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19128        use arbitrary::{Arbitrary, Unstructured};
19129        let mut buf = [0u8; 1024];
19130        rng.fill_bytes(&mut buf);
19131        let mut unstructured = Unstructured::new(&buf);
19132        Self::arbitrary(&mut unstructured).unwrap_or_default()
19133    }
19134}
19135impl Default for MESSAGE_INTERVAL_DATA {
19136    fn default() -> Self {
19137        Self::DEFAULT.clone()
19138    }
19139}
19140impl MessageData for MESSAGE_INTERVAL_DATA {
19141    type Message = MavMessage;
19142    const ID: u32 = 244u32;
19143    const NAME: &'static str = "MESSAGE_INTERVAL";
19144    const EXTRA_CRC: u8 = 95u8;
19145    const ENCODED_LEN: usize = 6usize;
19146    fn deser(
19147        _version: MavlinkVersion,
19148        __input: &[u8],
19149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19150        let avail_len = __input.len();
19151        let mut payload_buf = [0; Self::ENCODED_LEN];
19152        let mut buf = if avail_len < Self::ENCODED_LEN {
19153            payload_buf[0..avail_len].copy_from_slice(__input);
19154            Bytes::new(&payload_buf)
19155        } else {
19156            Bytes::new(__input)
19157        };
19158        let mut __struct = Self::default();
19159        __struct.interval_us = buf.get_i32_le()?;
19160        __struct.message_id = buf.get_u16_le()?;
19161        Ok(__struct)
19162    }
19163    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19164        let mut __tmp = BytesMut::new(bytes);
19165        #[allow(clippy::absurd_extreme_comparisons)]
19166        #[allow(unused_comparisons)]
19167        if __tmp.remaining() < Self::ENCODED_LEN {
19168            panic!(
19169                "buffer is too small (need {} bytes, but got {})",
19170                Self::ENCODED_LEN,
19171                __tmp.remaining(),
19172            )
19173        }
19174        __tmp.put_i32_le(self.interval_us);
19175        __tmp.put_u16_le(self.message_id);
19176        if matches!(version, MavlinkVersion::V2) {
19177            let len = __tmp.len();
19178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19179        } else {
19180            __tmp.len()
19181        }
19182    }
19183}
19184#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19185#[doc = ""]
19186#[doc = "ID: 47"]
19187#[derive(Debug, Clone, PartialEq)]
19188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19190#[cfg_attr(feature = "ts", derive(TS))]
19191#[cfg_attr(feature = "ts", ts(export))]
19192pub struct MISSION_ACK_DATA {
19193    #[doc = "System ID"]
19194    pub target_system: u8,
19195    #[doc = "Component ID"]
19196    pub target_component: u8,
19197    #[doc = "Mission result."]
19198    pub mavtype: MavMissionResult,
19199    #[doc = "Mission type."]
19200    #[cfg_attr(feature = "serde", serde(default))]
19201    pub mission_type: MavMissionType,
19202    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19203    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19204    pub opaque_id: u32,
19205}
19206impl MISSION_ACK_DATA {
19207    pub const ENCODED_LEN: usize = 8usize;
19208    pub const DEFAULT: Self = Self {
19209        target_system: 0_u8,
19210        target_component: 0_u8,
19211        mavtype: MavMissionResult::DEFAULT,
19212        mission_type: MavMissionType::DEFAULT,
19213        opaque_id: 0_u32,
19214    };
19215    #[cfg(feature = "arbitrary")]
19216    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19217        use arbitrary::{Arbitrary, Unstructured};
19218        let mut buf = [0u8; 1024];
19219        rng.fill_bytes(&mut buf);
19220        let mut unstructured = Unstructured::new(&buf);
19221        Self::arbitrary(&mut unstructured).unwrap_or_default()
19222    }
19223}
19224impl Default for MISSION_ACK_DATA {
19225    fn default() -> Self {
19226        Self::DEFAULT.clone()
19227    }
19228}
19229impl MessageData for MISSION_ACK_DATA {
19230    type Message = MavMessage;
19231    const ID: u32 = 47u32;
19232    const NAME: &'static str = "MISSION_ACK";
19233    const EXTRA_CRC: u8 = 153u8;
19234    const ENCODED_LEN: usize = 8usize;
19235    fn deser(
19236        _version: MavlinkVersion,
19237        __input: &[u8],
19238    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19239        let avail_len = __input.len();
19240        let mut payload_buf = [0; Self::ENCODED_LEN];
19241        let mut buf = if avail_len < Self::ENCODED_LEN {
19242            payload_buf[0..avail_len].copy_from_slice(__input);
19243            Bytes::new(&payload_buf)
19244        } else {
19245            Bytes::new(__input)
19246        };
19247        let mut __struct = Self::default();
19248        __struct.target_system = buf.get_u8()?;
19249        __struct.target_component = buf.get_u8()?;
19250        let tmp = buf.get_u8()?;
19251        __struct.mavtype =
19252            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19253                enum_type: "MavMissionResult",
19254                value: tmp as u64,
19255            })?;
19256        let tmp = buf.get_u8()?;
19257        __struct.mission_type =
19258            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19259                enum_type: "MavMissionType",
19260                value: tmp as u64,
19261            })?;
19262        __struct.opaque_id = buf.get_u32_le()?;
19263        Ok(__struct)
19264    }
19265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19266        let mut __tmp = BytesMut::new(bytes);
19267        #[allow(clippy::absurd_extreme_comparisons)]
19268        #[allow(unused_comparisons)]
19269        if __tmp.remaining() < Self::ENCODED_LEN {
19270            panic!(
19271                "buffer is too small (need {} bytes, but got {})",
19272                Self::ENCODED_LEN,
19273                __tmp.remaining(),
19274            )
19275        }
19276        __tmp.put_u8(self.target_system);
19277        __tmp.put_u8(self.target_component);
19278        __tmp.put_u8(self.mavtype as u8);
19279        if matches!(version, MavlinkVersion::V2) {
19280            __tmp.put_u8(self.mission_type as u8);
19281            __tmp.put_u32_le(self.opaque_id);
19282            let len = __tmp.len();
19283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19284        } else {
19285            __tmp.len()
19286        }
19287    }
19288}
19289#[doc = "Delete all mission items at once."]
19290#[doc = ""]
19291#[doc = "ID: 45"]
19292#[derive(Debug, Clone, PartialEq)]
19293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19295#[cfg_attr(feature = "ts", derive(TS))]
19296#[cfg_attr(feature = "ts", ts(export))]
19297pub struct MISSION_CLEAR_ALL_DATA {
19298    #[doc = "System ID"]
19299    pub target_system: u8,
19300    #[doc = "Component ID"]
19301    pub target_component: u8,
19302    #[doc = "Mission type."]
19303    #[cfg_attr(feature = "serde", serde(default))]
19304    pub mission_type: MavMissionType,
19305}
19306impl MISSION_CLEAR_ALL_DATA {
19307    pub const ENCODED_LEN: usize = 3usize;
19308    pub const DEFAULT: Self = Self {
19309        target_system: 0_u8,
19310        target_component: 0_u8,
19311        mission_type: MavMissionType::DEFAULT,
19312    };
19313    #[cfg(feature = "arbitrary")]
19314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19315        use arbitrary::{Arbitrary, Unstructured};
19316        let mut buf = [0u8; 1024];
19317        rng.fill_bytes(&mut buf);
19318        let mut unstructured = Unstructured::new(&buf);
19319        Self::arbitrary(&mut unstructured).unwrap_or_default()
19320    }
19321}
19322impl Default for MISSION_CLEAR_ALL_DATA {
19323    fn default() -> Self {
19324        Self::DEFAULT.clone()
19325    }
19326}
19327impl MessageData for MISSION_CLEAR_ALL_DATA {
19328    type Message = MavMessage;
19329    const ID: u32 = 45u32;
19330    const NAME: &'static str = "MISSION_CLEAR_ALL";
19331    const EXTRA_CRC: u8 = 232u8;
19332    const ENCODED_LEN: usize = 3usize;
19333    fn deser(
19334        _version: MavlinkVersion,
19335        __input: &[u8],
19336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19337        let avail_len = __input.len();
19338        let mut payload_buf = [0; Self::ENCODED_LEN];
19339        let mut buf = if avail_len < Self::ENCODED_LEN {
19340            payload_buf[0..avail_len].copy_from_slice(__input);
19341            Bytes::new(&payload_buf)
19342        } else {
19343            Bytes::new(__input)
19344        };
19345        let mut __struct = Self::default();
19346        __struct.target_system = buf.get_u8()?;
19347        __struct.target_component = buf.get_u8()?;
19348        let tmp = buf.get_u8()?;
19349        __struct.mission_type =
19350            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19351                enum_type: "MavMissionType",
19352                value: tmp as u64,
19353            })?;
19354        Ok(__struct)
19355    }
19356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19357        let mut __tmp = BytesMut::new(bytes);
19358        #[allow(clippy::absurd_extreme_comparisons)]
19359        #[allow(unused_comparisons)]
19360        if __tmp.remaining() < Self::ENCODED_LEN {
19361            panic!(
19362                "buffer is too small (need {} bytes, but got {})",
19363                Self::ENCODED_LEN,
19364                __tmp.remaining(),
19365            )
19366        }
19367        __tmp.put_u8(self.target_system);
19368        __tmp.put_u8(self.target_component);
19369        if matches!(version, MavlinkVersion::V2) {
19370            __tmp.put_u8(self.mission_type as u8);
19371            let len = __tmp.len();
19372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19373        } else {
19374            __tmp.len()
19375        }
19376    }
19377}
19378#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19379#[doc = ""]
19380#[doc = "ID: 44"]
19381#[derive(Debug, Clone, PartialEq)]
19382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19384#[cfg_attr(feature = "ts", derive(TS))]
19385#[cfg_attr(feature = "ts", ts(export))]
19386pub struct MISSION_COUNT_DATA {
19387    #[doc = "Number of mission items in the sequence"]
19388    pub count: u16,
19389    #[doc = "System ID"]
19390    pub target_system: u8,
19391    #[doc = "Component ID"]
19392    pub target_component: u8,
19393    #[doc = "Mission type."]
19394    #[cfg_attr(feature = "serde", serde(default))]
19395    pub mission_type: MavMissionType,
19396    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19397    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19398    pub opaque_id: u32,
19399}
19400impl MISSION_COUNT_DATA {
19401    pub const ENCODED_LEN: usize = 9usize;
19402    pub const DEFAULT: Self = Self {
19403        count: 0_u16,
19404        target_system: 0_u8,
19405        target_component: 0_u8,
19406        mission_type: MavMissionType::DEFAULT,
19407        opaque_id: 0_u32,
19408    };
19409    #[cfg(feature = "arbitrary")]
19410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19411        use arbitrary::{Arbitrary, Unstructured};
19412        let mut buf = [0u8; 1024];
19413        rng.fill_bytes(&mut buf);
19414        let mut unstructured = Unstructured::new(&buf);
19415        Self::arbitrary(&mut unstructured).unwrap_or_default()
19416    }
19417}
19418impl Default for MISSION_COUNT_DATA {
19419    fn default() -> Self {
19420        Self::DEFAULT.clone()
19421    }
19422}
19423impl MessageData for MISSION_COUNT_DATA {
19424    type Message = MavMessage;
19425    const ID: u32 = 44u32;
19426    const NAME: &'static str = "MISSION_COUNT";
19427    const EXTRA_CRC: u8 = 221u8;
19428    const ENCODED_LEN: usize = 9usize;
19429    fn deser(
19430        _version: MavlinkVersion,
19431        __input: &[u8],
19432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19433        let avail_len = __input.len();
19434        let mut payload_buf = [0; Self::ENCODED_LEN];
19435        let mut buf = if avail_len < Self::ENCODED_LEN {
19436            payload_buf[0..avail_len].copy_from_slice(__input);
19437            Bytes::new(&payload_buf)
19438        } else {
19439            Bytes::new(__input)
19440        };
19441        let mut __struct = Self::default();
19442        __struct.count = buf.get_u16_le()?;
19443        __struct.target_system = buf.get_u8()?;
19444        __struct.target_component = buf.get_u8()?;
19445        let tmp = buf.get_u8()?;
19446        __struct.mission_type =
19447            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19448                enum_type: "MavMissionType",
19449                value: tmp as u64,
19450            })?;
19451        __struct.opaque_id = buf.get_u32_le()?;
19452        Ok(__struct)
19453    }
19454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19455        let mut __tmp = BytesMut::new(bytes);
19456        #[allow(clippy::absurd_extreme_comparisons)]
19457        #[allow(unused_comparisons)]
19458        if __tmp.remaining() < Self::ENCODED_LEN {
19459            panic!(
19460                "buffer is too small (need {} bytes, but got {})",
19461                Self::ENCODED_LEN,
19462                __tmp.remaining(),
19463            )
19464        }
19465        __tmp.put_u16_le(self.count);
19466        __tmp.put_u8(self.target_system);
19467        __tmp.put_u8(self.target_component);
19468        if matches!(version, MavlinkVersion::V2) {
19469            __tmp.put_u8(self.mission_type as u8);
19470            __tmp.put_u32_le(self.opaque_id);
19471            let len = __tmp.len();
19472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19473        } else {
19474            __tmp.len()
19475        }
19476    }
19477}
19478#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19479#[doc = ""]
19480#[doc = "ID: 42"]
19481#[derive(Debug, Clone, PartialEq)]
19482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19484#[cfg_attr(feature = "ts", derive(TS))]
19485#[cfg_attr(feature = "ts", ts(export))]
19486pub struct MISSION_CURRENT_DATA {
19487    #[doc = "Sequence"]
19488    pub seq: u16,
19489    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19490    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19491    pub total: u16,
19492    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19493    #[cfg_attr(feature = "serde", serde(default))]
19494    pub mission_state: MissionState,
19495    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19496    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19497    pub mission_mode: u8,
19498    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19499    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19500    pub mission_id: u32,
19501    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19502    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19503    pub fence_id: u32,
19504    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19505    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19506    pub rally_points_id: u32,
19507}
19508impl MISSION_CURRENT_DATA {
19509    pub const ENCODED_LEN: usize = 18usize;
19510    pub const DEFAULT: Self = Self {
19511        seq: 0_u16,
19512        total: 0_u16,
19513        mission_state: MissionState::DEFAULT,
19514        mission_mode: 0_u8,
19515        mission_id: 0_u32,
19516        fence_id: 0_u32,
19517        rally_points_id: 0_u32,
19518    };
19519    #[cfg(feature = "arbitrary")]
19520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19521        use arbitrary::{Arbitrary, Unstructured};
19522        let mut buf = [0u8; 1024];
19523        rng.fill_bytes(&mut buf);
19524        let mut unstructured = Unstructured::new(&buf);
19525        Self::arbitrary(&mut unstructured).unwrap_or_default()
19526    }
19527}
19528impl Default for MISSION_CURRENT_DATA {
19529    fn default() -> Self {
19530        Self::DEFAULT.clone()
19531    }
19532}
19533impl MessageData for MISSION_CURRENT_DATA {
19534    type Message = MavMessage;
19535    const ID: u32 = 42u32;
19536    const NAME: &'static str = "MISSION_CURRENT";
19537    const EXTRA_CRC: u8 = 28u8;
19538    const ENCODED_LEN: usize = 18usize;
19539    fn deser(
19540        _version: MavlinkVersion,
19541        __input: &[u8],
19542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19543        let avail_len = __input.len();
19544        let mut payload_buf = [0; Self::ENCODED_LEN];
19545        let mut buf = if avail_len < Self::ENCODED_LEN {
19546            payload_buf[0..avail_len].copy_from_slice(__input);
19547            Bytes::new(&payload_buf)
19548        } else {
19549            Bytes::new(__input)
19550        };
19551        let mut __struct = Self::default();
19552        __struct.seq = buf.get_u16_le()?;
19553        __struct.total = buf.get_u16_le()?;
19554        let tmp = buf.get_u8()?;
19555        __struct.mission_state =
19556            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19557                enum_type: "MissionState",
19558                value: tmp as u64,
19559            })?;
19560        __struct.mission_mode = buf.get_u8()?;
19561        __struct.mission_id = buf.get_u32_le()?;
19562        __struct.fence_id = buf.get_u32_le()?;
19563        __struct.rally_points_id = buf.get_u32_le()?;
19564        Ok(__struct)
19565    }
19566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19567        let mut __tmp = BytesMut::new(bytes);
19568        #[allow(clippy::absurd_extreme_comparisons)]
19569        #[allow(unused_comparisons)]
19570        if __tmp.remaining() < Self::ENCODED_LEN {
19571            panic!(
19572                "buffer is too small (need {} bytes, but got {})",
19573                Self::ENCODED_LEN,
19574                __tmp.remaining(),
19575            )
19576        }
19577        __tmp.put_u16_le(self.seq);
19578        if matches!(version, MavlinkVersion::V2) {
19579            __tmp.put_u16_le(self.total);
19580            __tmp.put_u8(self.mission_state as u8);
19581            __tmp.put_u8(self.mission_mode);
19582            __tmp.put_u32_le(self.mission_id);
19583            __tmp.put_u32_le(self.fence_id);
19584            __tmp.put_u32_le(self.rally_points_id);
19585            let len = __tmp.len();
19586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19587        } else {
19588            __tmp.len()
19589        }
19590    }
19591}
19592#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19593#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19594#[doc = ""]
19595#[doc = "ID: 39"]
19596#[derive(Debug, Clone, PartialEq)]
19597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19599#[cfg_attr(feature = "ts", derive(TS))]
19600#[cfg_attr(feature = "ts", ts(export))]
19601pub struct MISSION_ITEM_DATA {
19602    #[doc = "PARAM1, see MAV_CMD enum"]
19603    pub param1: f32,
19604    #[doc = "PARAM2, see MAV_CMD enum"]
19605    pub param2: f32,
19606    #[doc = "PARAM3, see MAV_CMD enum"]
19607    pub param3: f32,
19608    #[doc = "PARAM4, see MAV_CMD enum"]
19609    pub param4: f32,
19610    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19611    pub x: f32,
19612    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19613    pub y: f32,
19614    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19615    pub z: f32,
19616    #[doc = "Sequence"]
19617    pub seq: u16,
19618    #[doc = "The scheduled action for the waypoint."]
19619    pub command: MavCmd,
19620    #[doc = "System ID"]
19621    pub target_system: u8,
19622    #[doc = "Component ID"]
19623    pub target_component: u8,
19624    #[doc = "The coordinate system of the waypoint."]
19625    pub frame: MavFrame,
19626    #[doc = "false:0, true:1"]
19627    pub current: u8,
19628    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19629    pub autocontinue: u8,
19630    #[doc = "Mission type."]
19631    #[cfg_attr(feature = "serde", serde(default))]
19632    pub mission_type: MavMissionType,
19633}
19634impl MISSION_ITEM_DATA {
19635    pub const ENCODED_LEN: usize = 38usize;
19636    pub const DEFAULT: Self = Self {
19637        param1: 0.0_f32,
19638        param2: 0.0_f32,
19639        param3: 0.0_f32,
19640        param4: 0.0_f32,
19641        x: 0.0_f32,
19642        y: 0.0_f32,
19643        z: 0.0_f32,
19644        seq: 0_u16,
19645        command: MavCmd::DEFAULT,
19646        target_system: 0_u8,
19647        target_component: 0_u8,
19648        frame: MavFrame::DEFAULT,
19649        current: 0_u8,
19650        autocontinue: 0_u8,
19651        mission_type: MavMissionType::DEFAULT,
19652    };
19653    #[cfg(feature = "arbitrary")]
19654    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19655        use arbitrary::{Arbitrary, Unstructured};
19656        let mut buf = [0u8; 1024];
19657        rng.fill_bytes(&mut buf);
19658        let mut unstructured = Unstructured::new(&buf);
19659        Self::arbitrary(&mut unstructured).unwrap_or_default()
19660    }
19661}
19662impl Default for MISSION_ITEM_DATA {
19663    fn default() -> Self {
19664        Self::DEFAULT.clone()
19665    }
19666}
19667impl MessageData for MISSION_ITEM_DATA {
19668    type Message = MavMessage;
19669    const ID: u32 = 39u32;
19670    const NAME: &'static str = "MISSION_ITEM";
19671    const EXTRA_CRC: u8 = 254u8;
19672    const ENCODED_LEN: usize = 38usize;
19673    fn deser(
19674        _version: MavlinkVersion,
19675        __input: &[u8],
19676    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19677        let avail_len = __input.len();
19678        let mut payload_buf = [0; Self::ENCODED_LEN];
19679        let mut buf = if avail_len < Self::ENCODED_LEN {
19680            payload_buf[0..avail_len].copy_from_slice(__input);
19681            Bytes::new(&payload_buf)
19682        } else {
19683            Bytes::new(__input)
19684        };
19685        let mut __struct = Self::default();
19686        __struct.param1 = buf.get_f32_le()?;
19687        __struct.param2 = buf.get_f32_le()?;
19688        __struct.param3 = buf.get_f32_le()?;
19689        __struct.param4 = buf.get_f32_le()?;
19690        __struct.x = buf.get_f32_le()?;
19691        __struct.y = buf.get_f32_le()?;
19692        __struct.z = buf.get_f32_le()?;
19693        __struct.seq = buf.get_u16_le()?;
19694        let tmp = buf.get_u16_le()?;
19695        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19696            ::mavlink_core::error::ParserError::InvalidEnum {
19697                enum_type: "MavCmd",
19698                value: tmp as u64,
19699            },
19700        )?;
19701        __struct.target_system = buf.get_u8()?;
19702        __struct.target_component = buf.get_u8()?;
19703        let tmp = buf.get_u8()?;
19704        __struct.frame =
19705            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19706                enum_type: "MavFrame",
19707                value: tmp as u64,
19708            })?;
19709        __struct.current = buf.get_u8()?;
19710        __struct.autocontinue = buf.get_u8()?;
19711        let tmp = buf.get_u8()?;
19712        __struct.mission_type =
19713            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19714                enum_type: "MavMissionType",
19715                value: tmp as u64,
19716            })?;
19717        Ok(__struct)
19718    }
19719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19720        let mut __tmp = BytesMut::new(bytes);
19721        #[allow(clippy::absurd_extreme_comparisons)]
19722        #[allow(unused_comparisons)]
19723        if __tmp.remaining() < Self::ENCODED_LEN {
19724            panic!(
19725                "buffer is too small (need {} bytes, but got {})",
19726                Self::ENCODED_LEN,
19727                __tmp.remaining(),
19728            )
19729        }
19730        __tmp.put_f32_le(self.param1);
19731        __tmp.put_f32_le(self.param2);
19732        __tmp.put_f32_le(self.param3);
19733        __tmp.put_f32_le(self.param4);
19734        __tmp.put_f32_le(self.x);
19735        __tmp.put_f32_le(self.y);
19736        __tmp.put_f32_le(self.z);
19737        __tmp.put_u16_le(self.seq);
19738        __tmp.put_u16_le(self.command as u16);
19739        __tmp.put_u8(self.target_system);
19740        __tmp.put_u8(self.target_component);
19741        __tmp.put_u8(self.frame as u8);
19742        __tmp.put_u8(self.current);
19743        __tmp.put_u8(self.autocontinue);
19744        if matches!(version, MavlinkVersion::V2) {
19745            __tmp.put_u8(self.mission_type as u8);
19746            let len = __tmp.len();
19747            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19748        } else {
19749            __tmp.len()
19750        }
19751    }
19752}
19753#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19754#[doc = ""]
19755#[doc = "ID: 73"]
19756#[derive(Debug, Clone, PartialEq)]
19757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19759#[cfg_attr(feature = "ts", derive(TS))]
19760#[cfg_attr(feature = "ts", ts(export))]
19761pub struct MISSION_ITEM_INT_DATA {
19762    #[doc = "PARAM1, see MAV_CMD enum"]
19763    pub param1: f32,
19764    #[doc = "PARAM2, see MAV_CMD enum"]
19765    pub param2: f32,
19766    #[doc = "PARAM3, see MAV_CMD enum"]
19767    pub param3: f32,
19768    #[doc = "PARAM4, see MAV_CMD enum"]
19769    pub param4: f32,
19770    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19771    pub x: i32,
19772    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19773    pub y: i32,
19774    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19775    pub z: f32,
19776    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19777    pub seq: u16,
19778    #[doc = "The scheduled action for the waypoint."]
19779    pub command: MavCmd,
19780    #[doc = "System ID"]
19781    pub target_system: u8,
19782    #[doc = "Component ID"]
19783    pub target_component: u8,
19784    #[doc = "The coordinate system of the waypoint."]
19785    pub frame: MavFrame,
19786    #[doc = "false:0, true:1"]
19787    pub current: u8,
19788    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19789    pub autocontinue: u8,
19790    #[doc = "Mission type."]
19791    #[cfg_attr(feature = "serde", serde(default))]
19792    pub mission_type: MavMissionType,
19793}
19794impl MISSION_ITEM_INT_DATA {
19795    pub const ENCODED_LEN: usize = 38usize;
19796    pub const DEFAULT: Self = Self {
19797        param1: 0.0_f32,
19798        param2: 0.0_f32,
19799        param3: 0.0_f32,
19800        param4: 0.0_f32,
19801        x: 0_i32,
19802        y: 0_i32,
19803        z: 0.0_f32,
19804        seq: 0_u16,
19805        command: MavCmd::DEFAULT,
19806        target_system: 0_u8,
19807        target_component: 0_u8,
19808        frame: MavFrame::DEFAULT,
19809        current: 0_u8,
19810        autocontinue: 0_u8,
19811        mission_type: MavMissionType::DEFAULT,
19812    };
19813    #[cfg(feature = "arbitrary")]
19814    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19815        use arbitrary::{Arbitrary, Unstructured};
19816        let mut buf = [0u8; 1024];
19817        rng.fill_bytes(&mut buf);
19818        let mut unstructured = Unstructured::new(&buf);
19819        Self::arbitrary(&mut unstructured).unwrap_or_default()
19820    }
19821}
19822impl Default for MISSION_ITEM_INT_DATA {
19823    fn default() -> Self {
19824        Self::DEFAULT.clone()
19825    }
19826}
19827impl MessageData for MISSION_ITEM_INT_DATA {
19828    type Message = MavMessage;
19829    const ID: u32 = 73u32;
19830    const NAME: &'static str = "MISSION_ITEM_INT";
19831    const EXTRA_CRC: u8 = 38u8;
19832    const ENCODED_LEN: usize = 38usize;
19833    fn deser(
19834        _version: MavlinkVersion,
19835        __input: &[u8],
19836    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19837        let avail_len = __input.len();
19838        let mut payload_buf = [0; Self::ENCODED_LEN];
19839        let mut buf = if avail_len < Self::ENCODED_LEN {
19840            payload_buf[0..avail_len].copy_from_slice(__input);
19841            Bytes::new(&payload_buf)
19842        } else {
19843            Bytes::new(__input)
19844        };
19845        let mut __struct = Self::default();
19846        __struct.param1 = buf.get_f32_le()?;
19847        __struct.param2 = buf.get_f32_le()?;
19848        __struct.param3 = buf.get_f32_le()?;
19849        __struct.param4 = buf.get_f32_le()?;
19850        __struct.x = buf.get_i32_le()?;
19851        __struct.y = buf.get_i32_le()?;
19852        __struct.z = buf.get_f32_le()?;
19853        __struct.seq = buf.get_u16_le()?;
19854        let tmp = buf.get_u16_le()?;
19855        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19856            ::mavlink_core::error::ParserError::InvalidEnum {
19857                enum_type: "MavCmd",
19858                value: tmp as u64,
19859            },
19860        )?;
19861        __struct.target_system = buf.get_u8()?;
19862        __struct.target_component = buf.get_u8()?;
19863        let tmp = buf.get_u8()?;
19864        __struct.frame =
19865            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19866                enum_type: "MavFrame",
19867                value: tmp as u64,
19868            })?;
19869        __struct.current = buf.get_u8()?;
19870        __struct.autocontinue = buf.get_u8()?;
19871        let tmp = buf.get_u8()?;
19872        __struct.mission_type =
19873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19874                enum_type: "MavMissionType",
19875                value: tmp as u64,
19876            })?;
19877        Ok(__struct)
19878    }
19879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19880        let mut __tmp = BytesMut::new(bytes);
19881        #[allow(clippy::absurd_extreme_comparisons)]
19882        #[allow(unused_comparisons)]
19883        if __tmp.remaining() < Self::ENCODED_LEN {
19884            panic!(
19885                "buffer is too small (need {} bytes, but got {})",
19886                Self::ENCODED_LEN,
19887                __tmp.remaining(),
19888            )
19889        }
19890        __tmp.put_f32_le(self.param1);
19891        __tmp.put_f32_le(self.param2);
19892        __tmp.put_f32_le(self.param3);
19893        __tmp.put_f32_le(self.param4);
19894        __tmp.put_i32_le(self.x);
19895        __tmp.put_i32_le(self.y);
19896        __tmp.put_f32_le(self.z);
19897        __tmp.put_u16_le(self.seq);
19898        __tmp.put_u16_le(self.command as u16);
19899        __tmp.put_u8(self.target_system);
19900        __tmp.put_u8(self.target_component);
19901        __tmp.put_u8(self.frame as u8);
19902        __tmp.put_u8(self.current);
19903        __tmp.put_u8(self.autocontinue);
19904        if matches!(version, MavlinkVersion::V2) {
19905            __tmp.put_u8(self.mission_type as u8);
19906            let len = __tmp.len();
19907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19908        } else {
19909            __tmp.len()
19910        }
19911    }
19912}
19913#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19914#[doc = ""]
19915#[doc = "ID: 46"]
19916#[derive(Debug, Clone, PartialEq)]
19917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19919#[cfg_attr(feature = "ts", derive(TS))]
19920#[cfg_attr(feature = "ts", ts(export))]
19921pub struct MISSION_ITEM_REACHED_DATA {
19922    #[doc = "Sequence"]
19923    pub seq: u16,
19924}
19925impl MISSION_ITEM_REACHED_DATA {
19926    pub const ENCODED_LEN: usize = 2usize;
19927    pub const DEFAULT: Self = Self { seq: 0_u16 };
19928    #[cfg(feature = "arbitrary")]
19929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19930        use arbitrary::{Arbitrary, Unstructured};
19931        let mut buf = [0u8; 1024];
19932        rng.fill_bytes(&mut buf);
19933        let mut unstructured = Unstructured::new(&buf);
19934        Self::arbitrary(&mut unstructured).unwrap_or_default()
19935    }
19936}
19937impl Default for MISSION_ITEM_REACHED_DATA {
19938    fn default() -> Self {
19939        Self::DEFAULT.clone()
19940    }
19941}
19942impl MessageData for MISSION_ITEM_REACHED_DATA {
19943    type Message = MavMessage;
19944    const ID: u32 = 46u32;
19945    const NAME: &'static str = "MISSION_ITEM_REACHED";
19946    const EXTRA_CRC: u8 = 11u8;
19947    const ENCODED_LEN: usize = 2usize;
19948    fn deser(
19949        _version: MavlinkVersion,
19950        __input: &[u8],
19951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19952        let avail_len = __input.len();
19953        let mut payload_buf = [0; Self::ENCODED_LEN];
19954        let mut buf = if avail_len < Self::ENCODED_LEN {
19955            payload_buf[0..avail_len].copy_from_slice(__input);
19956            Bytes::new(&payload_buf)
19957        } else {
19958            Bytes::new(__input)
19959        };
19960        let mut __struct = Self::default();
19961        __struct.seq = buf.get_u16_le()?;
19962        Ok(__struct)
19963    }
19964    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19965        let mut __tmp = BytesMut::new(bytes);
19966        #[allow(clippy::absurd_extreme_comparisons)]
19967        #[allow(unused_comparisons)]
19968        if __tmp.remaining() < Self::ENCODED_LEN {
19969            panic!(
19970                "buffer is too small (need {} bytes, but got {})",
19971                Self::ENCODED_LEN,
19972                __tmp.remaining(),
19973            )
19974        }
19975        __tmp.put_u16_le(self.seq);
19976        if matches!(version, MavlinkVersion::V2) {
19977            let len = __tmp.len();
19978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19979        } else {
19980            __tmp.len()
19981        }
19982    }
19983}
19984#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19985#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19986#[doc = ""]
19987#[doc = "ID: 40"]
19988#[derive(Debug, Clone, PartialEq)]
19989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19991#[cfg_attr(feature = "ts", derive(TS))]
19992#[cfg_attr(feature = "ts", ts(export))]
19993pub struct MISSION_REQUEST_DATA {
19994    #[doc = "Sequence"]
19995    pub seq: u16,
19996    #[doc = "System ID"]
19997    pub target_system: u8,
19998    #[doc = "Component ID"]
19999    pub target_component: u8,
20000    #[doc = "Mission type."]
20001    #[cfg_attr(feature = "serde", serde(default))]
20002    pub mission_type: MavMissionType,
20003}
20004impl MISSION_REQUEST_DATA {
20005    pub const ENCODED_LEN: usize = 5usize;
20006    pub const DEFAULT: Self = Self {
20007        seq: 0_u16,
20008        target_system: 0_u8,
20009        target_component: 0_u8,
20010        mission_type: MavMissionType::DEFAULT,
20011    };
20012    #[cfg(feature = "arbitrary")]
20013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20014        use arbitrary::{Arbitrary, Unstructured};
20015        let mut buf = [0u8; 1024];
20016        rng.fill_bytes(&mut buf);
20017        let mut unstructured = Unstructured::new(&buf);
20018        Self::arbitrary(&mut unstructured).unwrap_or_default()
20019    }
20020}
20021impl Default for MISSION_REQUEST_DATA {
20022    fn default() -> Self {
20023        Self::DEFAULT.clone()
20024    }
20025}
20026impl MessageData for MISSION_REQUEST_DATA {
20027    type Message = MavMessage;
20028    const ID: u32 = 40u32;
20029    const NAME: &'static str = "MISSION_REQUEST";
20030    const EXTRA_CRC: u8 = 230u8;
20031    const ENCODED_LEN: usize = 5usize;
20032    fn deser(
20033        _version: MavlinkVersion,
20034        __input: &[u8],
20035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20036        let avail_len = __input.len();
20037        let mut payload_buf = [0; Self::ENCODED_LEN];
20038        let mut buf = if avail_len < Self::ENCODED_LEN {
20039            payload_buf[0..avail_len].copy_from_slice(__input);
20040            Bytes::new(&payload_buf)
20041        } else {
20042            Bytes::new(__input)
20043        };
20044        let mut __struct = Self::default();
20045        __struct.seq = buf.get_u16_le()?;
20046        __struct.target_system = buf.get_u8()?;
20047        __struct.target_component = buf.get_u8()?;
20048        let tmp = buf.get_u8()?;
20049        __struct.mission_type =
20050            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20051                enum_type: "MavMissionType",
20052                value: tmp as u64,
20053            })?;
20054        Ok(__struct)
20055    }
20056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20057        let mut __tmp = BytesMut::new(bytes);
20058        #[allow(clippy::absurd_extreme_comparisons)]
20059        #[allow(unused_comparisons)]
20060        if __tmp.remaining() < Self::ENCODED_LEN {
20061            panic!(
20062                "buffer is too small (need {} bytes, but got {})",
20063                Self::ENCODED_LEN,
20064                __tmp.remaining(),
20065            )
20066        }
20067        __tmp.put_u16_le(self.seq);
20068        __tmp.put_u8(self.target_system);
20069        __tmp.put_u8(self.target_component);
20070        if matches!(version, MavlinkVersion::V2) {
20071            __tmp.put_u8(self.mission_type as u8);
20072            let len = __tmp.len();
20073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20074        } else {
20075            __tmp.len()
20076        }
20077    }
20078}
20079#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20080#[doc = ""]
20081#[doc = "ID: 51"]
20082#[derive(Debug, Clone, PartialEq)]
20083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20085#[cfg_attr(feature = "ts", derive(TS))]
20086#[cfg_attr(feature = "ts", ts(export))]
20087pub struct MISSION_REQUEST_INT_DATA {
20088    #[doc = "Sequence"]
20089    pub seq: u16,
20090    #[doc = "System ID"]
20091    pub target_system: u8,
20092    #[doc = "Component ID"]
20093    pub target_component: u8,
20094    #[doc = "Mission type."]
20095    #[cfg_attr(feature = "serde", serde(default))]
20096    pub mission_type: MavMissionType,
20097}
20098impl MISSION_REQUEST_INT_DATA {
20099    pub const ENCODED_LEN: usize = 5usize;
20100    pub const DEFAULT: Self = Self {
20101        seq: 0_u16,
20102        target_system: 0_u8,
20103        target_component: 0_u8,
20104        mission_type: MavMissionType::DEFAULT,
20105    };
20106    #[cfg(feature = "arbitrary")]
20107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20108        use arbitrary::{Arbitrary, Unstructured};
20109        let mut buf = [0u8; 1024];
20110        rng.fill_bytes(&mut buf);
20111        let mut unstructured = Unstructured::new(&buf);
20112        Self::arbitrary(&mut unstructured).unwrap_or_default()
20113    }
20114}
20115impl Default for MISSION_REQUEST_INT_DATA {
20116    fn default() -> Self {
20117        Self::DEFAULT.clone()
20118    }
20119}
20120impl MessageData for MISSION_REQUEST_INT_DATA {
20121    type Message = MavMessage;
20122    const ID: u32 = 51u32;
20123    const NAME: &'static str = "MISSION_REQUEST_INT";
20124    const EXTRA_CRC: u8 = 196u8;
20125    const ENCODED_LEN: usize = 5usize;
20126    fn deser(
20127        _version: MavlinkVersion,
20128        __input: &[u8],
20129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20130        let avail_len = __input.len();
20131        let mut payload_buf = [0; Self::ENCODED_LEN];
20132        let mut buf = if avail_len < Self::ENCODED_LEN {
20133            payload_buf[0..avail_len].copy_from_slice(__input);
20134            Bytes::new(&payload_buf)
20135        } else {
20136            Bytes::new(__input)
20137        };
20138        let mut __struct = Self::default();
20139        __struct.seq = buf.get_u16_le()?;
20140        __struct.target_system = buf.get_u8()?;
20141        __struct.target_component = buf.get_u8()?;
20142        let tmp = buf.get_u8()?;
20143        __struct.mission_type =
20144            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20145                enum_type: "MavMissionType",
20146                value: tmp as u64,
20147            })?;
20148        Ok(__struct)
20149    }
20150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20151        let mut __tmp = BytesMut::new(bytes);
20152        #[allow(clippy::absurd_extreme_comparisons)]
20153        #[allow(unused_comparisons)]
20154        if __tmp.remaining() < Self::ENCODED_LEN {
20155            panic!(
20156                "buffer is too small (need {} bytes, but got {})",
20157                Self::ENCODED_LEN,
20158                __tmp.remaining(),
20159            )
20160        }
20161        __tmp.put_u16_le(self.seq);
20162        __tmp.put_u8(self.target_system);
20163        __tmp.put_u8(self.target_component);
20164        if matches!(version, MavlinkVersion::V2) {
20165            __tmp.put_u8(self.mission_type as u8);
20166            let len = __tmp.len();
20167            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20168        } else {
20169            __tmp.len()
20170        }
20171    }
20172}
20173#[doc = "Request the overall list of mission items from the system/component."]
20174#[doc = ""]
20175#[doc = "ID: 43"]
20176#[derive(Debug, Clone, PartialEq)]
20177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20179#[cfg_attr(feature = "ts", derive(TS))]
20180#[cfg_attr(feature = "ts", ts(export))]
20181pub struct MISSION_REQUEST_LIST_DATA {
20182    #[doc = "System ID"]
20183    pub target_system: u8,
20184    #[doc = "Component ID"]
20185    pub target_component: u8,
20186    #[doc = "Mission type."]
20187    #[cfg_attr(feature = "serde", serde(default))]
20188    pub mission_type: MavMissionType,
20189}
20190impl MISSION_REQUEST_LIST_DATA {
20191    pub const ENCODED_LEN: usize = 3usize;
20192    pub const DEFAULT: Self = Self {
20193        target_system: 0_u8,
20194        target_component: 0_u8,
20195        mission_type: MavMissionType::DEFAULT,
20196    };
20197    #[cfg(feature = "arbitrary")]
20198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20199        use arbitrary::{Arbitrary, Unstructured};
20200        let mut buf = [0u8; 1024];
20201        rng.fill_bytes(&mut buf);
20202        let mut unstructured = Unstructured::new(&buf);
20203        Self::arbitrary(&mut unstructured).unwrap_or_default()
20204    }
20205}
20206impl Default for MISSION_REQUEST_LIST_DATA {
20207    fn default() -> Self {
20208        Self::DEFAULT.clone()
20209    }
20210}
20211impl MessageData for MISSION_REQUEST_LIST_DATA {
20212    type Message = MavMessage;
20213    const ID: u32 = 43u32;
20214    const NAME: &'static str = "MISSION_REQUEST_LIST";
20215    const EXTRA_CRC: u8 = 132u8;
20216    const ENCODED_LEN: usize = 3usize;
20217    fn deser(
20218        _version: MavlinkVersion,
20219        __input: &[u8],
20220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20221        let avail_len = __input.len();
20222        let mut payload_buf = [0; Self::ENCODED_LEN];
20223        let mut buf = if avail_len < Self::ENCODED_LEN {
20224            payload_buf[0..avail_len].copy_from_slice(__input);
20225            Bytes::new(&payload_buf)
20226        } else {
20227            Bytes::new(__input)
20228        };
20229        let mut __struct = Self::default();
20230        __struct.target_system = buf.get_u8()?;
20231        __struct.target_component = buf.get_u8()?;
20232        let tmp = buf.get_u8()?;
20233        __struct.mission_type =
20234            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20235                enum_type: "MavMissionType",
20236                value: tmp as u64,
20237            })?;
20238        Ok(__struct)
20239    }
20240    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20241        let mut __tmp = BytesMut::new(bytes);
20242        #[allow(clippy::absurd_extreme_comparisons)]
20243        #[allow(unused_comparisons)]
20244        if __tmp.remaining() < Self::ENCODED_LEN {
20245            panic!(
20246                "buffer is too small (need {} bytes, but got {})",
20247                Self::ENCODED_LEN,
20248                __tmp.remaining(),
20249            )
20250        }
20251        __tmp.put_u8(self.target_system);
20252        __tmp.put_u8(self.target_component);
20253        if matches!(version, MavlinkVersion::V2) {
20254            __tmp.put_u8(self.mission_type as u8);
20255            let len = __tmp.len();
20256            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20257        } else {
20258            __tmp.len()
20259        }
20260    }
20261}
20262#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20263#[doc = ""]
20264#[doc = "ID: 37"]
20265#[derive(Debug, Clone, PartialEq)]
20266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20268#[cfg_attr(feature = "ts", derive(TS))]
20269#[cfg_attr(feature = "ts", ts(export))]
20270pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20271    #[doc = "Start index"]
20272    pub start_index: i16,
20273    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20274    pub end_index: i16,
20275    #[doc = "System ID"]
20276    pub target_system: u8,
20277    #[doc = "Component ID"]
20278    pub target_component: u8,
20279    #[doc = "Mission type."]
20280    #[cfg_attr(feature = "serde", serde(default))]
20281    pub mission_type: MavMissionType,
20282}
20283impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20284    pub const ENCODED_LEN: usize = 7usize;
20285    pub const DEFAULT: Self = Self {
20286        start_index: 0_i16,
20287        end_index: 0_i16,
20288        target_system: 0_u8,
20289        target_component: 0_u8,
20290        mission_type: MavMissionType::DEFAULT,
20291    };
20292    #[cfg(feature = "arbitrary")]
20293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20294        use arbitrary::{Arbitrary, Unstructured};
20295        let mut buf = [0u8; 1024];
20296        rng.fill_bytes(&mut buf);
20297        let mut unstructured = Unstructured::new(&buf);
20298        Self::arbitrary(&mut unstructured).unwrap_or_default()
20299    }
20300}
20301impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20302    fn default() -> Self {
20303        Self::DEFAULT.clone()
20304    }
20305}
20306impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20307    type Message = MavMessage;
20308    const ID: u32 = 37u32;
20309    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20310    const EXTRA_CRC: u8 = 212u8;
20311    const ENCODED_LEN: usize = 7usize;
20312    fn deser(
20313        _version: MavlinkVersion,
20314        __input: &[u8],
20315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20316        let avail_len = __input.len();
20317        let mut payload_buf = [0; Self::ENCODED_LEN];
20318        let mut buf = if avail_len < Self::ENCODED_LEN {
20319            payload_buf[0..avail_len].copy_from_slice(__input);
20320            Bytes::new(&payload_buf)
20321        } else {
20322            Bytes::new(__input)
20323        };
20324        let mut __struct = Self::default();
20325        __struct.start_index = buf.get_i16_le()?;
20326        __struct.end_index = buf.get_i16_le()?;
20327        __struct.target_system = buf.get_u8()?;
20328        __struct.target_component = buf.get_u8()?;
20329        let tmp = buf.get_u8()?;
20330        __struct.mission_type =
20331            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20332                enum_type: "MavMissionType",
20333                value: tmp as u64,
20334            })?;
20335        Ok(__struct)
20336    }
20337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20338        let mut __tmp = BytesMut::new(bytes);
20339        #[allow(clippy::absurd_extreme_comparisons)]
20340        #[allow(unused_comparisons)]
20341        if __tmp.remaining() < Self::ENCODED_LEN {
20342            panic!(
20343                "buffer is too small (need {} bytes, but got {})",
20344                Self::ENCODED_LEN,
20345                __tmp.remaining(),
20346            )
20347        }
20348        __tmp.put_i16_le(self.start_index);
20349        __tmp.put_i16_le(self.end_index);
20350        __tmp.put_u8(self.target_system);
20351        __tmp.put_u8(self.target_component);
20352        if matches!(version, MavlinkVersion::V2) {
20353            __tmp.put_u8(self.mission_type as u8);
20354            let len = __tmp.len();
20355            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20356        } else {
20357            __tmp.len()
20358        }
20359    }
20360}
20361#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20362#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20363#[doc = ""]
20364#[doc = "ID: 41"]
20365#[derive(Debug, Clone, PartialEq)]
20366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20368#[cfg_attr(feature = "ts", derive(TS))]
20369#[cfg_attr(feature = "ts", ts(export))]
20370pub struct MISSION_SET_CURRENT_DATA {
20371    #[doc = "Sequence"]
20372    pub seq: u16,
20373    #[doc = "System ID"]
20374    pub target_system: u8,
20375    #[doc = "Component ID"]
20376    pub target_component: u8,
20377}
20378impl MISSION_SET_CURRENT_DATA {
20379    pub const ENCODED_LEN: usize = 4usize;
20380    pub const DEFAULT: Self = Self {
20381        seq: 0_u16,
20382        target_system: 0_u8,
20383        target_component: 0_u8,
20384    };
20385    #[cfg(feature = "arbitrary")]
20386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20387        use arbitrary::{Arbitrary, Unstructured};
20388        let mut buf = [0u8; 1024];
20389        rng.fill_bytes(&mut buf);
20390        let mut unstructured = Unstructured::new(&buf);
20391        Self::arbitrary(&mut unstructured).unwrap_or_default()
20392    }
20393}
20394impl Default for MISSION_SET_CURRENT_DATA {
20395    fn default() -> Self {
20396        Self::DEFAULT.clone()
20397    }
20398}
20399impl MessageData for MISSION_SET_CURRENT_DATA {
20400    type Message = MavMessage;
20401    const ID: u32 = 41u32;
20402    const NAME: &'static str = "MISSION_SET_CURRENT";
20403    const EXTRA_CRC: u8 = 28u8;
20404    const ENCODED_LEN: usize = 4usize;
20405    fn deser(
20406        _version: MavlinkVersion,
20407        __input: &[u8],
20408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20409        let avail_len = __input.len();
20410        let mut payload_buf = [0; Self::ENCODED_LEN];
20411        let mut buf = if avail_len < Self::ENCODED_LEN {
20412            payload_buf[0..avail_len].copy_from_slice(__input);
20413            Bytes::new(&payload_buf)
20414        } else {
20415            Bytes::new(__input)
20416        };
20417        let mut __struct = Self::default();
20418        __struct.seq = buf.get_u16_le()?;
20419        __struct.target_system = buf.get_u8()?;
20420        __struct.target_component = buf.get_u8()?;
20421        Ok(__struct)
20422    }
20423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20424        let mut __tmp = BytesMut::new(bytes);
20425        #[allow(clippy::absurd_extreme_comparisons)]
20426        #[allow(unused_comparisons)]
20427        if __tmp.remaining() < Self::ENCODED_LEN {
20428            panic!(
20429                "buffer is too small (need {} bytes, but got {})",
20430                Self::ENCODED_LEN,
20431                __tmp.remaining(),
20432            )
20433        }
20434        __tmp.put_u16_le(self.seq);
20435        __tmp.put_u8(self.target_system);
20436        __tmp.put_u8(self.target_component);
20437        if matches!(version, MavlinkVersion::V2) {
20438            let len = __tmp.len();
20439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20440        } else {
20441            __tmp.len()
20442        }
20443    }
20444}
20445#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20446#[doc = ""]
20447#[doc = "ID: 38"]
20448#[derive(Debug, Clone, PartialEq)]
20449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20451#[cfg_attr(feature = "ts", derive(TS))]
20452#[cfg_attr(feature = "ts", ts(export))]
20453pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20454    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20455    pub start_index: i16,
20456    #[doc = "End index, equal or greater than start index."]
20457    pub end_index: i16,
20458    #[doc = "System ID"]
20459    pub target_system: u8,
20460    #[doc = "Component ID"]
20461    pub target_component: u8,
20462    #[doc = "Mission type."]
20463    #[cfg_attr(feature = "serde", serde(default))]
20464    pub mission_type: MavMissionType,
20465}
20466impl MISSION_WRITE_PARTIAL_LIST_DATA {
20467    pub const ENCODED_LEN: usize = 7usize;
20468    pub const DEFAULT: Self = Self {
20469        start_index: 0_i16,
20470        end_index: 0_i16,
20471        target_system: 0_u8,
20472        target_component: 0_u8,
20473        mission_type: MavMissionType::DEFAULT,
20474    };
20475    #[cfg(feature = "arbitrary")]
20476    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20477        use arbitrary::{Arbitrary, Unstructured};
20478        let mut buf = [0u8; 1024];
20479        rng.fill_bytes(&mut buf);
20480        let mut unstructured = Unstructured::new(&buf);
20481        Self::arbitrary(&mut unstructured).unwrap_or_default()
20482    }
20483}
20484impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20485    fn default() -> Self {
20486        Self::DEFAULT.clone()
20487    }
20488}
20489impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20490    type Message = MavMessage;
20491    const ID: u32 = 38u32;
20492    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20493    const EXTRA_CRC: u8 = 9u8;
20494    const ENCODED_LEN: usize = 7usize;
20495    fn deser(
20496        _version: MavlinkVersion,
20497        __input: &[u8],
20498    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20499        let avail_len = __input.len();
20500        let mut payload_buf = [0; Self::ENCODED_LEN];
20501        let mut buf = if avail_len < Self::ENCODED_LEN {
20502            payload_buf[0..avail_len].copy_from_slice(__input);
20503            Bytes::new(&payload_buf)
20504        } else {
20505            Bytes::new(__input)
20506        };
20507        let mut __struct = Self::default();
20508        __struct.start_index = buf.get_i16_le()?;
20509        __struct.end_index = buf.get_i16_le()?;
20510        __struct.target_system = buf.get_u8()?;
20511        __struct.target_component = buf.get_u8()?;
20512        let tmp = buf.get_u8()?;
20513        __struct.mission_type =
20514            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20515                enum_type: "MavMissionType",
20516                value: tmp as u64,
20517            })?;
20518        Ok(__struct)
20519    }
20520    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20521        let mut __tmp = BytesMut::new(bytes);
20522        #[allow(clippy::absurd_extreme_comparisons)]
20523        #[allow(unused_comparisons)]
20524        if __tmp.remaining() < Self::ENCODED_LEN {
20525            panic!(
20526                "buffer is too small (need {} bytes, but got {})",
20527                Self::ENCODED_LEN,
20528                __tmp.remaining(),
20529            )
20530        }
20531        __tmp.put_i16_le(self.start_index);
20532        __tmp.put_i16_le(self.end_index);
20533        __tmp.put_u8(self.target_system);
20534        __tmp.put_u8(self.target_component);
20535        if matches!(version, MavlinkVersion::V2) {
20536            __tmp.put_u8(self.mission_type as u8);
20537            let len = __tmp.len();
20538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20539        } else {
20540            __tmp.len()
20541        }
20542    }
20543}
20544#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20545#[doc = "Orientation of a mount."]
20546#[doc = ""]
20547#[doc = "ID: 265"]
20548#[derive(Debug, Clone, PartialEq)]
20549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20551#[cfg_attr(feature = "ts", derive(TS))]
20552#[cfg_attr(feature = "ts", ts(export))]
20553pub struct MOUNT_ORIENTATION_DATA {
20554    #[doc = "Timestamp (time since system boot)."]
20555    pub time_boot_ms: u32,
20556    #[doc = "Roll in global frame (set to NaN for invalid)."]
20557    pub roll: f32,
20558    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20559    pub pitch: f32,
20560    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20561    pub yaw: f32,
20562    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20563    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20564    pub yaw_absolute: f32,
20565}
20566impl MOUNT_ORIENTATION_DATA {
20567    pub const ENCODED_LEN: usize = 20usize;
20568    pub const DEFAULT: Self = Self {
20569        time_boot_ms: 0_u32,
20570        roll: 0.0_f32,
20571        pitch: 0.0_f32,
20572        yaw: 0.0_f32,
20573        yaw_absolute: 0.0_f32,
20574    };
20575    #[cfg(feature = "arbitrary")]
20576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20577        use arbitrary::{Arbitrary, Unstructured};
20578        let mut buf = [0u8; 1024];
20579        rng.fill_bytes(&mut buf);
20580        let mut unstructured = Unstructured::new(&buf);
20581        Self::arbitrary(&mut unstructured).unwrap_or_default()
20582    }
20583}
20584impl Default for MOUNT_ORIENTATION_DATA {
20585    fn default() -> Self {
20586        Self::DEFAULT.clone()
20587    }
20588}
20589impl MessageData for MOUNT_ORIENTATION_DATA {
20590    type Message = MavMessage;
20591    const ID: u32 = 265u32;
20592    const NAME: &'static str = "MOUNT_ORIENTATION";
20593    const EXTRA_CRC: u8 = 26u8;
20594    const ENCODED_LEN: usize = 20usize;
20595    fn deser(
20596        _version: MavlinkVersion,
20597        __input: &[u8],
20598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20599        let avail_len = __input.len();
20600        let mut payload_buf = [0; Self::ENCODED_LEN];
20601        let mut buf = if avail_len < Self::ENCODED_LEN {
20602            payload_buf[0..avail_len].copy_from_slice(__input);
20603            Bytes::new(&payload_buf)
20604        } else {
20605            Bytes::new(__input)
20606        };
20607        let mut __struct = Self::default();
20608        __struct.time_boot_ms = buf.get_u32_le()?;
20609        __struct.roll = buf.get_f32_le()?;
20610        __struct.pitch = buf.get_f32_le()?;
20611        __struct.yaw = buf.get_f32_le()?;
20612        __struct.yaw_absolute = buf.get_f32_le()?;
20613        Ok(__struct)
20614    }
20615    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20616        let mut __tmp = BytesMut::new(bytes);
20617        #[allow(clippy::absurd_extreme_comparisons)]
20618        #[allow(unused_comparisons)]
20619        if __tmp.remaining() < Self::ENCODED_LEN {
20620            panic!(
20621                "buffer is too small (need {} bytes, but got {})",
20622                Self::ENCODED_LEN,
20623                __tmp.remaining(),
20624            )
20625        }
20626        __tmp.put_u32_le(self.time_boot_ms);
20627        __tmp.put_f32_le(self.roll);
20628        __tmp.put_f32_le(self.pitch);
20629        __tmp.put_f32_le(self.yaw);
20630        if matches!(version, MavlinkVersion::V2) {
20631            __tmp.put_f32_le(self.yaw_absolute);
20632            let len = __tmp.len();
20633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20634        } else {
20635            __tmp.len()
20636        }
20637    }
20638}
20639#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20640#[doc = ""]
20641#[doc = "ID: 251"]
20642#[derive(Debug, Clone, PartialEq)]
20643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20645#[cfg_attr(feature = "ts", derive(TS))]
20646#[cfg_attr(feature = "ts", ts(export))]
20647pub struct NAMED_VALUE_FLOAT_DATA {
20648    #[doc = "Timestamp (time since system boot)."]
20649    pub time_boot_ms: u32,
20650    #[doc = "Floating point value"]
20651    pub value: f32,
20652    #[doc = "Name of the debug variable"]
20653    #[cfg_attr(feature = "ts", ts(type = "string"))]
20654    pub name: CharArray<10>,
20655}
20656impl NAMED_VALUE_FLOAT_DATA {
20657    pub const ENCODED_LEN: usize = 18usize;
20658    pub const DEFAULT: Self = Self {
20659        time_boot_ms: 0_u32,
20660        value: 0.0_f32,
20661        name: CharArray::new([0_u8; 10usize]),
20662    };
20663    #[cfg(feature = "arbitrary")]
20664    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20665        use arbitrary::{Arbitrary, Unstructured};
20666        let mut buf = [0u8; 1024];
20667        rng.fill_bytes(&mut buf);
20668        let mut unstructured = Unstructured::new(&buf);
20669        Self::arbitrary(&mut unstructured).unwrap_or_default()
20670    }
20671}
20672impl Default for NAMED_VALUE_FLOAT_DATA {
20673    fn default() -> Self {
20674        Self::DEFAULT.clone()
20675    }
20676}
20677impl MessageData for NAMED_VALUE_FLOAT_DATA {
20678    type Message = MavMessage;
20679    const ID: u32 = 251u32;
20680    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20681    const EXTRA_CRC: u8 = 170u8;
20682    const ENCODED_LEN: usize = 18usize;
20683    fn deser(
20684        _version: MavlinkVersion,
20685        __input: &[u8],
20686    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20687        let avail_len = __input.len();
20688        let mut payload_buf = [0; Self::ENCODED_LEN];
20689        let mut buf = if avail_len < Self::ENCODED_LEN {
20690            payload_buf[0..avail_len].copy_from_slice(__input);
20691            Bytes::new(&payload_buf)
20692        } else {
20693            Bytes::new(__input)
20694        };
20695        let mut __struct = Self::default();
20696        __struct.time_boot_ms = buf.get_u32_le()?;
20697        __struct.value = buf.get_f32_le()?;
20698        let mut tmp = [0_u8; 10usize];
20699        for v in &mut tmp {
20700            *v = buf.get_u8()?;
20701        }
20702        __struct.name = CharArray::new(tmp);
20703        Ok(__struct)
20704    }
20705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20706        let mut __tmp = BytesMut::new(bytes);
20707        #[allow(clippy::absurd_extreme_comparisons)]
20708        #[allow(unused_comparisons)]
20709        if __tmp.remaining() < Self::ENCODED_LEN {
20710            panic!(
20711                "buffer is too small (need {} bytes, but got {})",
20712                Self::ENCODED_LEN,
20713                __tmp.remaining(),
20714            )
20715        }
20716        __tmp.put_u32_le(self.time_boot_ms);
20717        __tmp.put_f32_le(self.value);
20718        for val in &self.name {
20719            __tmp.put_u8(*val);
20720        }
20721        if matches!(version, MavlinkVersion::V2) {
20722            let len = __tmp.len();
20723            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20724        } else {
20725            __tmp.len()
20726        }
20727    }
20728}
20729#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20730#[doc = ""]
20731#[doc = "ID: 252"]
20732#[derive(Debug, Clone, PartialEq)]
20733#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20735#[cfg_attr(feature = "ts", derive(TS))]
20736#[cfg_attr(feature = "ts", ts(export))]
20737pub struct NAMED_VALUE_INT_DATA {
20738    #[doc = "Timestamp (time since system boot)."]
20739    pub time_boot_ms: u32,
20740    #[doc = "Signed integer value"]
20741    pub value: i32,
20742    #[doc = "Name of the debug variable"]
20743    #[cfg_attr(feature = "ts", ts(type = "string"))]
20744    pub name: CharArray<10>,
20745}
20746impl NAMED_VALUE_INT_DATA {
20747    pub const ENCODED_LEN: usize = 18usize;
20748    pub const DEFAULT: Self = Self {
20749        time_boot_ms: 0_u32,
20750        value: 0_i32,
20751        name: CharArray::new([0_u8; 10usize]),
20752    };
20753    #[cfg(feature = "arbitrary")]
20754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20755        use arbitrary::{Arbitrary, Unstructured};
20756        let mut buf = [0u8; 1024];
20757        rng.fill_bytes(&mut buf);
20758        let mut unstructured = Unstructured::new(&buf);
20759        Self::arbitrary(&mut unstructured).unwrap_or_default()
20760    }
20761}
20762impl Default for NAMED_VALUE_INT_DATA {
20763    fn default() -> Self {
20764        Self::DEFAULT.clone()
20765    }
20766}
20767impl MessageData for NAMED_VALUE_INT_DATA {
20768    type Message = MavMessage;
20769    const ID: u32 = 252u32;
20770    const NAME: &'static str = "NAMED_VALUE_INT";
20771    const EXTRA_CRC: u8 = 44u8;
20772    const ENCODED_LEN: usize = 18usize;
20773    fn deser(
20774        _version: MavlinkVersion,
20775        __input: &[u8],
20776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20777        let avail_len = __input.len();
20778        let mut payload_buf = [0; Self::ENCODED_LEN];
20779        let mut buf = if avail_len < Self::ENCODED_LEN {
20780            payload_buf[0..avail_len].copy_from_slice(__input);
20781            Bytes::new(&payload_buf)
20782        } else {
20783            Bytes::new(__input)
20784        };
20785        let mut __struct = Self::default();
20786        __struct.time_boot_ms = buf.get_u32_le()?;
20787        __struct.value = buf.get_i32_le()?;
20788        let mut tmp = [0_u8; 10usize];
20789        for v in &mut tmp {
20790            *v = buf.get_u8()?;
20791        }
20792        __struct.name = CharArray::new(tmp);
20793        Ok(__struct)
20794    }
20795    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20796        let mut __tmp = BytesMut::new(bytes);
20797        #[allow(clippy::absurd_extreme_comparisons)]
20798        #[allow(unused_comparisons)]
20799        if __tmp.remaining() < Self::ENCODED_LEN {
20800            panic!(
20801                "buffer is too small (need {} bytes, but got {})",
20802                Self::ENCODED_LEN,
20803                __tmp.remaining(),
20804            )
20805        }
20806        __tmp.put_u32_le(self.time_boot_ms);
20807        __tmp.put_i32_le(self.value);
20808        for val in &self.name {
20809            __tmp.put_u8(*val);
20810        }
20811        if matches!(version, MavlinkVersion::V2) {
20812            let len = __tmp.len();
20813            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20814        } else {
20815            __tmp.len()
20816        }
20817    }
20818}
20819#[doc = "The state of the navigation and position controller."]
20820#[doc = ""]
20821#[doc = "ID: 62"]
20822#[derive(Debug, Clone, PartialEq)]
20823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20825#[cfg_attr(feature = "ts", derive(TS))]
20826#[cfg_attr(feature = "ts", ts(export))]
20827pub struct NAV_CONTROLLER_OUTPUT_DATA {
20828    #[doc = "Current desired roll"]
20829    pub nav_roll: f32,
20830    #[doc = "Current desired pitch"]
20831    pub nav_pitch: f32,
20832    #[doc = "Current altitude error"]
20833    pub alt_error: f32,
20834    #[doc = "Current airspeed error"]
20835    pub aspd_error: f32,
20836    #[doc = "Current crosstrack error on x-y plane"]
20837    pub xtrack_error: f32,
20838    #[doc = "Current desired heading"]
20839    pub nav_bearing: i16,
20840    #[doc = "Bearing to current waypoint/target"]
20841    pub target_bearing: i16,
20842    #[doc = "Distance to active waypoint"]
20843    pub wp_dist: u16,
20844}
20845impl NAV_CONTROLLER_OUTPUT_DATA {
20846    pub const ENCODED_LEN: usize = 26usize;
20847    pub const DEFAULT: Self = Self {
20848        nav_roll: 0.0_f32,
20849        nav_pitch: 0.0_f32,
20850        alt_error: 0.0_f32,
20851        aspd_error: 0.0_f32,
20852        xtrack_error: 0.0_f32,
20853        nav_bearing: 0_i16,
20854        target_bearing: 0_i16,
20855        wp_dist: 0_u16,
20856    };
20857    #[cfg(feature = "arbitrary")]
20858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20859        use arbitrary::{Arbitrary, Unstructured};
20860        let mut buf = [0u8; 1024];
20861        rng.fill_bytes(&mut buf);
20862        let mut unstructured = Unstructured::new(&buf);
20863        Self::arbitrary(&mut unstructured).unwrap_or_default()
20864    }
20865}
20866impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20867    fn default() -> Self {
20868        Self::DEFAULT.clone()
20869    }
20870}
20871impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20872    type Message = MavMessage;
20873    const ID: u32 = 62u32;
20874    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20875    const EXTRA_CRC: u8 = 183u8;
20876    const ENCODED_LEN: usize = 26usize;
20877    fn deser(
20878        _version: MavlinkVersion,
20879        __input: &[u8],
20880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20881        let avail_len = __input.len();
20882        let mut payload_buf = [0; Self::ENCODED_LEN];
20883        let mut buf = if avail_len < Self::ENCODED_LEN {
20884            payload_buf[0..avail_len].copy_from_slice(__input);
20885            Bytes::new(&payload_buf)
20886        } else {
20887            Bytes::new(__input)
20888        };
20889        let mut __struct = Self::default();
20890        __struct.nav_roll = buf.get_f32_le()?;
20891        __struct.nav_pitch = buf.get_f32_le()?;
20892        __struct.alt_error = buf.get_f32_le()?;
20893        __struct.aspd_error = buf.get_f32_le()?;
20894        __struct.xtrack_error = buf.get_f32_le()?;
20895        __struct.nav_bearing = buf.get_i16_le()?;
20896        __struct.target_bearing = buf.get_i16_le()?;
20897        __struct.wp_dist = buf.get_u16_le()?;
20898        Ok(__struct)
20899    }
20900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20901        let mut __tmp = BytesMut::new(bytes);
20902        #[allow(clippy::absurd_extreme_comparisons)]
20903        #[allow(unused_comparisons)]
20904        if __tmp.remaining() < Self::ENCODED_LEN {
20905            panic!(
20906                "buffer is too small (need {} bytes, but got {})",
20907                Self::ENCODED_LEN,
20908                __tmp.remaining(),
20909            )
20910        }
20911        __tmp.put_f32_le(self.nav_roll);
20912        __tmp.put_f32_le(self.nav_pitch);
20913        __tmp.put_f32_le(self.alt_error);
20914        __tmp.put_f32_le(self.aspd_error);
20915        __tmp.put_f32_le(self.xtrack_error);
20916        __tmp.put_i16_le(self.nav_bearing);
20917        __tmp.put_i16_le(self.target_bearing);
20918        __tmp.put_u16_le(self.wp_dist);
20919        if matches!(version, MavlinkVersion::V2) {
20920            let len = __tmp.len();
20921            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20922        } else {
20923            __tmp.len()
20924        }
20925    }
20926}
20927#[doc = "Accelerometer and Gyro biases from the navigation filter."]
20928#[doc = ""]
20929#[doc = "ID: 220"]
20930#[derive(Debug, Clone, PartialEq)]
20931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20933#[cfg_attr(feature = "ts", derive(TS))]
20934#[cfg_attr(feature = "ts", ts(export))]
20935pub struct NAV_FILTER_BIAS_DATA {
20936    #[doc = "Timestamp (microseconds)"]
20937    pub usec: u64,
20938    #[doc = "b_f[0]"]
20939    pub accel_0: f32,
20940    #[doc = "b_f[1]"]
20941    pub accel_1: f32,
20942    #[doc = "b_f[2]"]
20943    pub accel_2: f32,
20944    #[doc = "b_f[0]"]
20945    pub gyro_0: f32,
20946    #[doc = "b_f[1]"]
20947    pub gyro_1: f32,
20948    #[doc = "b_f[2]"]
20949    pub gyro_2: f32,
20950}
20951impl NAV_FILTER_BIAS_DATA {
20952    pub const ENCODED_LEN: usize = 32usize;
20953    pub const DEFAULT: Self = Self {
20954        usec: 0_u64,
20955        accel_0: 0.0_f32,
20956        accel_1: 0.0_f32,
20957        accel_2: 0.0_f32,
20958        gyro_0: 0.0_f32,
20959        gyro_1: 0.0_f32,
20960        gyro_2: 0.0_f32,
20961    };
20962    #[cfg(feature = "arbitrary")]
20963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20964        use arbitrary::{Arbitrary, Unstructured};
20965        let mut buf = [0u8; 1024];
20966        rng.fill_bytes(&mut buf);
20967        let mut unstructured = Unstructured::new(&buf);
20968        Self::arbitrary(&mut unstructured).unwrap_or_default()
20969    }
20970}
20971impl Default for NAV_FILTER_BIAS_DATA {
20972    fn default() -> Self {
20973        Self::DEFAULT.clone()
20974    }
20975}
20976impl MessageData for NAV_FILTER_BIAS_DATA {
20977    type Message = MavMessage;
20978    const ID: u32 = 220u32;
20979    const NAME: &'static str = "NAV_FILTER_BIAS";
20980    const EXTRA_CRC: u8 = 34u8;
20981    const ENCODED_LEN: usize = 32usize;
20982    fn deser(
20983        _version: MavlinkVersion,
20984        __input: &[u8],
20985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20986        let avail_len = __input.len();
20987        let mut payload_buf = [0; Self::ENCODED_LEN];
20988        let mut buf = if avail_len < Self::ENCODED_LEN {
20989            payload_buf[0..avail_len].copy_from_slice(__input);
20990            Bytes::new(&payload_buf)
20991        } else {
20992            Bytes::new(__input)
20993        };
20994        let mut __struct = Self::default();
20995        __struct.usec = buf.get_u64_le()?;
20996        __struct.accel_0 = buf.get_f32_le()?;
20997        __struct.accel_1 = buf.get_f32_le()?;
20998        __struct.accel_2 = buf.get_f32_le()?;
20999        __struct.gyro_0 = buf.get_f32_le()?;
21000        __struct.gyro_1 = buf.get_f32_le()?;
21001        __struct.gyro_2 = buf.get_f32_le()?;
21002        Ok(__struct)
21003    }
21004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21005        let mut __tmp = BytesMut::new(bytes);
21006        #[allow(clippy::absurd_extreme_comparisons)]
21007        #[allow(unused_comparisons)]
21008        if __tmp.remaining() < Self::ENCODED_LEN {
21009            panic!(
21010                "buffer is too small (need {} bytes, but got {})",
21011                Self::ENCODED_LEN,
21012                __tmp.remaining(),
21013            )
21014        }
21015        __tmp.put_u64_le(self.usec);
21016        __tmp.put_f32_le(self.accel_0);
21017        __tmp.put_f32_le(self.accel_1);
21018        __tmp.put_f32_le(self.accel_2);
21019        __tmp.put_f32_le(self.gyro_0);
21020        __tmp.put_f32_le(self.gyro_1);
21021        __tmp.put_f32_le(self.gyro_2);
21022        if matches!(version, MavlinkVersion::V2) {
21023            let len = __tmp.len();
21024            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21025        } else {
21026            __tmp.len()
21027        }
21028    }
21029}
21030#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21031#[doc = ""]
21032#[doc = "ID: 330"]
21033#[derive(Debug, Clone, PartialEq)]
21034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21036#[cfg_attr(feature = "ts", derive(TS))]
21037#[cfg_attr(feature = "ts", ts(export))]
21038pub struct OBSTACLE_DISTANCE_DATA {
21039    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21040    pub time_usec: u64,
21041    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21042    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21043    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21044    pub distances: [u16; 72],
21045    #[doc = "Minimum distance the sensor can measure."]
21046    pub min_distance: u16,
21047    #[doc = "Maximum distance the sensor can measure."]
21048    pub max_distance: u16,
21049    #[doc = "Class id of the distance sensor type."]
21050    pub sensor_type: MavDistanceSensor,
21051    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21052    pub increment: u8,
21053    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21054    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21055    pub increment_f: f32,
21056    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21057    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21058    pub angle_offset: f32,
21059    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21060    #[cfg_attr(feature = "serde", serde(default))]
21061    pub frame: MavFrame,
21062}
21063impl OBSTACLE_DISTANCE_DATA {
21064    pub const ENCODED_LEN: usize = 167usize;
21065    pub const DEFAULT: Self = Self {
21066        time_usec: 0_u64,
21067        distances: [0_u16; 72usize],
21068        min_distance: 0_u16,
21069        max_distance: 0_u16,
21070        sensor_type: MavDistanceSensor::DEFAULT,
21071        increment: 0_u8,
21072        increment_f: 0.0_f32,
21073        angle_offset: 0.0_f32,
21074        frame: MavFrame::DEFAULT,
21075    };
21076    #[cfg(feature = "arbitrary")]
21077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21078        use arbitrary::{Arbitrary, Unstructured};
21079        let mut buf = [0u8; 1024];
21080        rng.fill_bytes(&mut buf);
21081        let mut unstructured = Unstructured::new(&buf);
21082        Self::arbitrary(&mut unstructured).unwrap_or_default()
21083    }
21084}
21085impl Default for OBSTACLE_DISTANCE_DATA {
21086    fn default() -> Self {
21087        Self::DEFAULT.clone()
21088    }
21089}
21090impl MessageData for OBSTACLE_DISTANCE_DATA {
21091    type Message = MavMessage;
21092    const ID: u32 = 330u32;
21093    const NAME: &'static str = "OBSTACLE_DISTANCE";
21094    const EXTRA_CRC: u8 = 23u8;
21095    const ENCODED_LEN: usize = 167usize;
21096    fn deser(
21097        _version: MavlinkVersion,
21098        __input: &[u8],
21099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21100        let avail_len = __input.len();
21101        let mut payload_buf = [0; Self::ENCODED_LEN];
21102        let mut buf = if avail_len < Self::ENCODED_LEN {
21103            payload_buf[0..avail_len].copy_from_slice(__input);
21104            Bytes::new(&payload_buf)
21105        } else {
21106            Bytes::new(__input)
21107        };
21108        let mut __struct = Self::default();
21109        __struct.time_usec = buf.get_u64_le()?;
21110        for v in &mut __struct.distances {
21111            let val = buf.get_u16_le()?;
21112            *v = val;
21113        }
21114        __struct.min_distance = buf.get_u16_le()?;
21115        __struct.max_distance = buf.get_u16_le()?;
21116        let tmp = buf.get_u8()?;
21117        __struct.sensor_type =
21118            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21119                enum_type: "MavDistanceSensor",
21120                value: tmp as u64,
21121            })?;
21122        __struct.increment = buf.get_u8()?;
21123        __struct.increment_f = buf.get_f32_le()?;
21124        __struct.angle_offset = buf.get_f32_le()?;
21125        let tmp = buf.get_u8()?;
21126        __struct.frame =
21127            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21128                enum_type: "MavFrame",
21129                value: tmp as u64,
21130            })?;
21131        Ok(__struct)
21132    }
21133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21134        let mut __tmp = BytesMut::new(bytes);
21135        #[allow(clippy::absurd_extreme_comparisons)]
21136        #[allow(unused_comparisons)]
21137        if __tmp.remaining() < Self::ENCODED_LEN {
21138            panic!(
21139                "buffer is too small (need {} bytes, but got {})",
21140                Self::ENCODED_LEN,
21141                __tmp.remaining(),
21142            )
21143        }
21144        __tmp.put_u64_le(self.time_usec);
21145        for val in &self.distances {
21146            __tmp.put_u16_le(*val);
21147        }
21148        __tmp.put_u16_le(self.min_distance);
21149        __tmp.put_u16_le(self.max_distance);
21150        __tmp.put_u8(self.sensor_type as u8);
21151        __tmp.put_u8(self.increment);
21152        if matches!(version, MavlinkVersion::V2) {
21153            __tmp.put_f32_le(self.increment_f);
21154            __tmp.put_f32_le(self.angle_offset);
21155            __tmp.put_u8(self.frame as u8);
21156            let len = __tmp.len();
21157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21158        } else {
21159            __tmp.len()
21160        }
21161    }
21162}
21163#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21164#[doc = ""]
21165#[doc = "ID: 331"]
21166#[derive(Debug, Clone, PartialEq)]
21167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21169#[cfg_attr(feature = "ts", derive(TS))]
21170#[cfg_attr(feature = "ts", ts(export))]
21171pub struct ODOMETRY_DATA {
21172    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21173    pub time_usec: u64,
21174    #[doc = "X Position"]
21175    pub x: f32,
21176    #[doc = "Y Position"]
21177    pub y: f32,
21178    #[doc = "Z Position"]
21179    pub z: f32,
21180    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21182    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21183    pub q: [f32; 4],
21184    #[doc = "X linear speed"]
21185    pub vx: f32,
21186    #[doc = "Y linear speed"]
21187    pub vy: f32,
21188    #[doc = "Z linear speed"]
21189    pub vz: f32,
21190    #[doc = "Roll angular speed"]
21191    pub rollspeed: f32,
21192    #[doc = "Pitch angular speed"]
21193    pub pitchspeed: f32,
21194    #[doc = "Yaw angular speed"]
21195    pub yawspeed: f32,
21196    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21197    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21198    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21199    pub pose_covariance: [f32; 21],
21200    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21201    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21202    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21203    pub velocity_covariance: [f32; 21],
21204    #[doc = "Coordinate frame of reference for the pose data."]
21205    pub frame_id: MavFrame,
21206    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21207    pub child_frame_id: MavFrame,
21208    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21209    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21210    pub reset_counter: u8,
21211    #[doc = "Type of estimator that is providing the odometry."]
21212    #[cfg_attr(feature = "serde", serde(default))]
21213    pub estimator_type: MavEstimatorType,
21214    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21215    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21216    pub quality: i8,
21217}
21218impl ODOMETRY_DATA {
21219    pub const ENCODED_LEN: usize = 233usize;
21220    pub const DEFAULT: Self = Self {
21221        time_usec: 0_u64,
21222        x: 0.0_f32,
21223        y: 0.0_f32,
21224        z: 0.0_f32,
21225        q: [0.0_f32; 4usize],
21226        vx: 0.0_f32,
21227        vy: 0.0_f32,
21228        vz: 0.0_f32,
21229        rollspeed: 0.0_f32,
21230        pitchspeed: 0.0_f32,
21231        yawspeed: 0.0_f32,
21232        pose_covariance: [0.0_f32; 21usize],
21233        velocity_covariance: [0.0_f32; 21usize],
21234        frame_id: MavFrame::DEFAULT,
21235        child_frame_id: MavFrame::DEFAULT,
21236        reset_counter: 0_u8,
21237        estimator_type: MavEstimatorType::DEFAULT,
21238        quality: 0_i8,
21239    };
21240    #[cfg(feature = "arbitrary")]
21241    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21242        use arbitrary::{Arbitrary, Unstructured};
21243        let mut buf = [0u8; 1024];
21244        rng.fill_bytes(&mut buf);
21245        let mut unstructured = Unstructured::new(&buf);
21246        Self::arbitrary(&mut unstructured).unwrap_or_default()
21247    }
21248}
21249impl Default for ODOMETRY_DATA {
21250    fn default() -> Self {
21251        Self::DEFAULT.clone()
21252    }
21253}
21254impl MessageData for ODOMETRY_DATA {
21255    type Message = MavMessage;
21256    const ID: u32 = 331u32;
21257    const NAME: &'static str = "ODOMETRY";
21258    const EXTRA_CRC: u8 = 91u8;
21259    const ENCODED_LEN: usize = 233usize;
21260    fn deser(
21261        _version: MavlinkVersion,
21262        __input: &[u8],
21263    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21264        let avail_len = __input.len();
21265        let mut payload_buf = [0; Self::ENCODED_LEN];
21266        let mut buf = if avail_len < Self::ENCODED_LEN {
21267            payload_buf[0..avail_len].copy_from_slice(__input);
21268            Bytes::new(&payload_buf)
21269        } else {
21270            Bytes::new(__input)
21271        };
21272        let mut __struct = Self::default();
21273        __struct.time_usec = buf.get_u64_le()?;
21274        __struct.x = buf.get_f32_le()?;
21275        __struct.y = buf.get_f32_le()?;
21276        __struct.z = buf.get_f32_le()?;
21277        for v in &mut __struct.q {
21278            let val = buf.get_f32_le()?;
21279            *v = val;
21280        }
21281        __struct.vx = buf.get_f32_le()?;
21282        __struct.vy = buf.get_f32_le()?;
21283        __struct.vz = buf.get_f32_le()?;
21284        __struct.rollspeed = buf.get_f32_le()?;
21285        __struct.pitchspeed = buf.get_f32_le()?;
21286        __struct.yawspeed = buf.get_f32_le()?;
21287        for v in &mut __struct.pose_covariance {
21288            let val = buf.get_f32_le()?;
21289            *v = val;
21290        }
21291        for v in &mut __struct.velocity_covariance {
21292            let val = buf.get_f32_le()?;
21293            *v = val;
21294        }
21295        let tmp = buf.get_u8()?;
21296        __struct.frame_id =
21297            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21298                enum_type: "MavFrame",
21299                value: tmp as u64,
21300            })?;
21301        let tmp = buf.get_u8()?;
21302        __struct.child_frame_id =
21303            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21304                enum_type: "MavFrame",
21305                value: tmp as u64,
21306            })?;
21307        __struct.reset_counter = buf.get_u8()?;
21308        let tmp = buf.get_u8()?;
21309        __struct.estimator_type =
21310            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21311                enum_type: "MavEstimatorType",
21312                value: tmp as u64,
21313            })?;
21314        __struct.quality = buf.get_i8()?;
21315        Ok(__struct)
21316    }
21317    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21318        let mut __tmp = BytesMut::new(bytes);
21319        #[allow(clippy::absurd_extreme_comparisons)]
21320        #[allow(unused_comparisons)]
21321        if __tmp.remaining() < Self::ENCODED_LEN {
21322            panic!(
21323                "buffer is too small (need {} bytes, but got {})",
21324                Self::ENCODED_LEN,
21325                __tmp.remaining(),
21326            )
21327        }
21328        __tmp.put_u64_le(self.time_usec);
21329        __tmp.put_f32_le(self.x);
21330        __tmp.put_f32_le(self.y);
21331        __tmp.put_f32_le(self.z);
21332        for val in &self.q {
21333            __tmp.put_f32_le(*val);
21334        }
21335        __tmp.put_f32_le(self.vx);
21336        __tmp.put_f32_le(self.vy);
21337        __tmp.put_f32_le(self.vz);
21338        __tmp.put_f32_le(self.rollspeed);
21339        __tmp.put_f32_le(self.pitchspeed);
21340        __tmp.put_f32_le(self.yawspeed);
21341        for val in &self.pose_covariance {
21342            __tmp.put_f32_le(*val);
21343        }
21344        for val in &self.velocity_covariance {
21345            __tmp.put_f32_le(*val);
21346        }
21347        __tmp.put_u8(self.frame_id as u8);
21348        __tmp.put_u8(self.child_frame_id as u8);
21349        if matches!(version, MavlinkVersion::V2) {
21350            __tmp.put_u8(self.reset_counter);
21351            __tmp.put_u8(self.estimator_type as u8);
21352            __tmp.put_i8(self.quality);
21353            let len = __tmp.len();
21354            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21355        } else {
21356            __tmp.len()
21357        }
21358    }
21359}
21360#[doc = "Hardware status sent by an onboard computer."]
21361#[doc = ""]
21362#[doc = "ID: 390"]
21363#[derive(Debug, Clone, PartialEq)]
21364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21366#[cfg_attr(feature = "ts", derive(TS))]
21367#[cfg_attr(feature = "ts", ts(export))]
21368pub struct ONBOARD_COMPUTER_STATUS_DATA {
21369    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21370    pub time_usec: u64,
21371    #[doc = "Time since system boot."]
21372    pub uptime: u32,
21373    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21374    pub ram_usage: u32,
21375    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21376    pub ram_total: u32,
21377    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21378    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21379    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21380    pub storage_type: [u32; 4],
21381    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21382    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21383    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21384    pub storage_usage: [u32; 4],
21385    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21386    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21387    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21388    pub storage_total: [u32; 4],
21389    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21391    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21392    pub link_type: [u32; 6],
21393    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21394    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21395    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21396    pub link_tx_rate: [u32; 6],
21397    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21398    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21399    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21400    pub link_rx_rate: [u32; 6],
21401    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21402    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21403    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21404    pub link_tx_max: [u32; 6],
21405    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21406    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21407    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21408    pub link_rx_max: [u32; 6],
21409    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21410    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21411    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21412    pub fan_speed: [i16; 4],
21413    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21414    pub mavtype: u8,
21415    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21416    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21417    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21418    pub cpu_cores: [u8; 8],
21419    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21420    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21421    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21422    pub cpu_combined: [u8; 10],
21423    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21425    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21426    pub gpu_cores: [u8; 4],
21427    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21429    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21430    pub gpu_combined: [u8; 10],
21431    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21432    pub temperature_board: i8,
21433    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21434    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21435    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21436    pub temperature_core: [i8; 8],
21437}
21438impl ONBOARD_COMPUTER_STATUS_DATA {
21439    pub const ENCODED_LEN: usize = 238usize;
21440    pub const DEFAULT: Self = Self {
21441        time_usec: 0_u64,
21442        uptime: 0_u32,
21443        ram_usage: 0_u32,
21444        ram_total: 0_u32,
21445        storage_type: [0_u32; 4usize],
21446        storage_usage: [0_u32; 4usize],
21447        storage_total: [0_u32; 4usize],
21448        link_type: [0_u32; 6usize],
21449        link_tx_rate: [0_u32; 6usize],
21450        link_rx_rate: [0_u32; 6usize],
21451        link_tx_max: [0_u32; 6usize],
21452        link_rx_max: [0_u32; 6usize],
21453        fan_speed: [0_i16; 4usize],
21454        mavtype: 0_u8,
21455        cpu_cores: [0_u8; 8usize],
21456        cpu_combined: [0_u8; 10usize],
21457        gpu_cores: [0_u8; 4usize],
21458        gpu_combined: [0_u8; 10usize],
21459        temperature_board: 0_i8,
21460        temperature_core: [0_i8; 8usize],
21461    };
21462    #[cfg(feature = "arbitrary")]
21463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21464        use arbitrary::{Arbitrary, Unstructured};
21465        let mut buf = [0u8; 1024];
21466        rng.fill_bytes(&mut buf);
21467        let mut unstructured = Unstructured::new(&buf);
21468        Self::arbitrary(&mut unstructured).unwrap_or_default()
21469    }
21470}
21471impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21472    fn default() -> Self {
21473        Self::DEFAULT.clone()
21474    }
21475}
21476impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21477    type Message = MavMessage;
21478    const ID: u32 = 390u32;
21479    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21480    const EXTRA_CRC: u8 = 156u8;
21481    const ENCODED_LEN: usize = 238usize;
21482    fn deser(
21483        _version: MavlinkVersion,
21484        __input: &[u8],
21485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21486        let avail_len = __input.len();
21487        let mut payload_buf = [0; Self::ENCODED_LEN];
21488        let mut buf = if avail_len < Self::ENCODED_LEN {
21489            payload_buf[0..avail_len].copy_from_slice(__input);
21490            Bytes::new(&payload_buf)
21491        } else {
21492            Bytes::new(__input)
21493        };
21494        let mut __struct = Self::default();
21495        __struct.time_usec = buf.get_u64_le()?;
21496        __struct.uptime = buf.get_u32_le()?;
21497        __struct.ram_usage = buf.get_u32_le()?;
21498        __struct.ram_total = buf.get_u32_le()?;
21499        for v in &mut __struct.storage_type {
21500            let val = buf.get_u32_le()?;
21501            *v = val;
21502        }
21503        for v in &mut __struct.storage_usage {
21504            let val = buf.get_u32_le()?;
21505            *v = val;
21506        }
21507        for v in &mut __struct.storage_total {
21508            let val = buf.get_u32_le()?;
21509            *v = val;
21510        }
21511        for v in &mut __struct.link_type {
21512            let val = buf.get_u32_le()?;
21513            *v = val;
21514        }
21515        for v in &mut __struct.link_tx_rate {
21516            let val = buf.get_u32_le()?;
21517            *v = val;
21518        }
21519        for v in &mut __struct.link_rx_rate {
21520            let val = buf.get_u32_le()?;
21521            *v = val;
21522        }
21523        for v in &mut __struct.link_tx_max {
21524            let val = buf.get_u32_le()?;
21525            *v = val;
21526        }
21527        for v in &mut __struct.link_rx_max {
21528            let val = buf.get_u32_le()?;
21529            *v = val;
21530        }
21531        for v in &mut __struct.fan_speed {
21532            let val = buf.get_i16_le()?;
21533            *v = val;
21534        }
21535        __struct.mavtype = buf.get_u8()?;
21536        for v in &mut __struct.cpu_cores {
21537            let val = buf.get_u8()?;
21538            *v = val;
21539        }
21540        for v in &mut __struct.cpu_combined {
21541            let val = buf.get_u8()?;
21542            *v = val;
21543        }
21544        for v in &mut __struct.gpu_cores {
21545            let val = buf.get_u8()?;
21546            *v = val;
21547        }
21548        for v in &mut __struct.gpu_combined {
21549            let val = buf.get_u8()?;
21550            *v = val;
21551        }
21552        __struct.temperature_board = buf.get_i8()?;
21553        for v in &mut __struct.temperature_core {
21554            let val = buf.get_i8()?;
21555            *v = val;
21556        }
21557        Ok(__struct)
21558    }
21559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21560        let mut __tmp = BytesMut::new(bytes);
21561        #[allow(clippy::absurd_extreme_comparisons)]
21562        #[allow(unused_comparisons)]
21563        if __tmp.remaining() < Self::ENCODED_LEN {
21564            panic!(
21565                "buffer is too small (need {} bytes, but got {})",
21566                Self::ENCODED_LEN,
21567                __tmp.remaining(),
21568            )
21569        }
21570        __tmp.put_u64_le(self.time_usec);
21571        __tmp.put_u32_le(self.uptime);
21572        __tmp.put_u32_le(self.ram_usage);
21573        __tmp.put_u32_le(self.ram_total);
21574        for val in &self.storage_type {
21575            __tmp.put_u32_le(*val);
21576        }
21577        for val in &self.storage_usage {
21578            __tmp.put_u32_le(*val);
21579        }
21580        for val in &self.storage_total {
21581            __tmp.put_u32_le(*val);
21582        }
21583        for val in &self.link_type {
21584            __tmp.put_u32_le(*val);
21585        }
21586        for val in &self.link_tx_rate {
21587            __tmp.put_u32_le(*val);
21588        }
21589        for val in &self.link_rx_rate {
21590            __tmp.put_u32_le(*val);
21591        }
21592        for val in &self.link_tx_max {
21593            __tmp.put_u32_le(*val);
21594        }
21595        for val in &self.link_rx_max {
21596            __tmp.put_u32_le(*val);
21597        }
21598        for val in &self.fan_speed {
21599            __tmp.put_i16_le(*val);
21600        }
21601        __tmp.put_u8(self.mavtype);
21602        for val in &self.cpu_cores {
21603            __tmp.put_u8(*val);
21604        }
21605        for val in &self.cpu_combined {
21606            __tmp.put_u8(*val);
21607        }
21608        for val in &self.gpu_cores {
21609            __tmp.put_u8(*val);
21610        }
21611        for val in &self.gpu_combined {
21612            __tmp.put_u8(*val);
21613        }
21614        __tmp.put_i8(self.temperature_board);
21615        for val in &self.temperature_core {
21616            __tmp.put_i8(*val);
21617        }
21618        if matches!(version, MavlinkVersion::V2) {
21619            let len = __tmp.len();
21620            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21621        } else {
21622            __tmp.len()
21623        }
21624    }
21625}
21626#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21627#[doc = ""]
21628#[doc = "ID: 12918"]
21629#[derive(Debug, Clone, PartialEq)]
21630#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21631#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21632#[cfg_attr(feature = "ts", derive(TS))]
21633#[cfg_attr(feature = "ts", ts(export))]
21634pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21635    #[doc = "Status level indicating if arming is allowed."]
21636    pub status: MavOdidArmStatus,
21637    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21638    #[cfg_attr(feature = "ts", ts(type = "string"))]
21639    pub error: CharArray<50>,
21640}
21641impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21642    pub const ENCODED_LEN: usize = 51usize;
21643    pub const DEFAULT: Self = Self {
21644        status: MavOdidArmStatus::DEFAULT,
21645        error: CharArray::new([0_u8; 50usize]),
21646    };
21647    #[cfg(feature = "arbitrary")]
21648    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21649        use arbitrary::{Arbitrary, Unstructured};
21650        let mut buf = [0u8; 1024];
21651        rng.fill_bytes(&mut buf);
21652        let mut unstructured = Unstructured::new(&buf);
21653        Self::arbitrary(&mut unstructured).unwrap_or_default()
21654    }
21655}
21656impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21657    fn default() -> Self {
21658        Self::DEFAULT.clone()
21659    }
21660}
21661impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21662    type Message = MavMessage;
21663    const ID: u32 = 12918u32;
21664    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21665    const EXTRA_CRC: u8 = 139u8;
21666    const ENCODED_LEN: usize = 51usize;
21667    fn deser(
21668        _version: MavlinkVersion,
21669        __input: &[u8],
21670    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21671        let avail_len = __input.len();
21672        let mut payload_buf = [0; Self::ENCODED_LEN];
21673        let mut buf = if avail_len < Self::ENCODED_LEN {
21674            payload_buf[0..avail_len].copy_from_slice(__input);
21675            Bytes::new(&payload_buf)
21676        } else {
21677            Bytes::new(__input)
21678        };
21679        let mut __struct = Self::default();
21680        let tmp = buf.get_u8()?;
21681        __struct.status =
21682            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21683                enum_type: "MavOdidArmStatus",
21684                value: tmp as u64,
21685            })?;
21686        let mut tmp = [0_u8; 50usize];
21687        for v in &mut tmp {
21688            *v = buf.get_u8()?;
21689        }
21690        __struct.error = CharArray::new(tmp);
21691        Ok(__struct)
21692    }
21693    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21694        let mut __tmp = BytesMut::new(bytes);
21695        #[allow(clippy::absurd_extreme_comparisons)]
21696        #[allow(unused_comparisons)]
21697        if __tmp.remaining() < Self::ENCODED_LEN {
21698            panic!(
21699                "buffer is too small (need {} bytes, but got {})",
21700                Self::ENCODED_LEN,
21701                __tmp.remaining(),
21702            )
21703        }
21704        __tmp.put_u8(self.status as u8);
21705        for val in &self.error {
21706            __tmp.put_u8(*val);
21707        }
21708        if matches!(version, MavlinkVersion::V2) {
21709            let len = __tmp.len();
21710            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21711        } else {
21712            __tmp.len()
21713        }
21714    }
21715}
21716#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21717#[doc = ""]
21718#[doc = "ID: 12902"]
21719#[derive(Debug, Clone, PartialEq)]
21720#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21721#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21722#[cfg_attr(feature = "ts", derive(TS))]
21723#[cfg_attr(feature = "ts", ts(export))]
21724pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21725    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21726    pub timestamp: u32,
21727    #[doc = "System ID (0 for broadcast)."]
21728    pub target_system: u8,
21729    #[doc = "Component ID (0 for broadcast)."]
21730    pub target_component: u8,
21731    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21732    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21733    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21734    pub id_or_mac: [u8; 20],
21735    #[doc = "Indicates the type of authentication."]
21736    pub authentication_type: MavOdidAuthType,
21737    #[doc = "Allowed range is 0 - 15."]
21738    pub data_page: u8,
21739    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21740    pub last_page_index: u8,
21741    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21742    pub length: u8,
21743    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21746    pub authentication_data: [u8; 23],
21747}
21748impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21749    pub const ENCODED_LEN: usize = 53usize;
21750    pub const DEFAULT: Self = Self {
21751        timestamp: 0_u32,
21752        target_system: 0_u8,
21753        target_component: 0_u8,
21754        id_or_mac: [0_u8; 20usize],
21755        authentication_type: MavOdidAuthType::DEFAULT,
21756        data_page: 0_u8,
21757        last_page_index: 0_u8,
21758        length: 0_u8,
21759        authentication_data: [0_u8; 23usize],
21760    };
21761    #[cfg(feature = "arbitrary")]
21762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21763        use arbitrary::{Arbitrary, Unstructured};
21764        let mut buf = [0u8; 1024];
21765        rng.fill_bytes(&mut buf);
21766        let mut unstructured = Unstructured::new(&buf);
21767        Self::arbitrary(&mut unstructured).unwrap_or_default()
21768    }
21769}
21770impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21771    fn default() -> Self {
21772        Self::DEFAULT.clone()
21773    }
21774}
21775impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21776    type Message = MavMessage;
21777    const ID: u32 = 12902u32;
21778    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21779    const EXTRA_CRC: u8 = 140u8;
21780    const ENCODED_LEN: usize = 53usize;
21781    fn deser(
21782        _version: MavlinkVersion,
21783        __input: &[u8],
21784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21785        let avail_len = __input.len();
21786        let mut payload_buf = [0; Self::ENCODED_LEN];
21787        let mut buf = if avail_len < Self::ENCODED_LEN {
21788            payload_buf[0..avail_len].copy_from_slice(__input);
21789            Bytes::new(&payload_buf)
21790        } else {
21791            Bytes::new(__input)
21792        };
21793        let mut __struct = Self::default();
21794        __struct.timestamp = buf.get_u32_le()?;
21795        __struct.target_system = buf.get_u8()?;
21796        __struct.target_component = buf.get_u8()?;
21797        for v in &mut __struct.id_or_mac {
21798            let val = buf.get_u8()?;
21799            *v = val;
21800        }
21801        let tmp = buf.get_u8()?;
21802        __struct.authentication_type =
21803            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21804                enum_type: "MavOdidAuthType",
21805                value: tmp as u64,
21806            })?;
21807        __struct.data_page = buf.get_u8()?;
21808        __struct.last_page_index = buf.get_u8()?;
21809        __struct.length = buf.get_u8()?;
21810        for v in &mut __struct.authentication_data {
21811            let val = buf.get_u8()?;
21812            *v = val;
21813        }
21814        Ok(__struct)
21815    }
21816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21817        let mut __tmp = BytesMut::new(bytes);
21818        #[allow(clippy::absurd_extreme_comparisons)]
21819        #[allow(unused_comparisons)]
21820        if __tmp.remaining() < Self::ENCODED_LEN {
21821            panic!(
21822                "buffer is too small (need {} bytes, but got {})",
21823                Self::ENCODED_LEN,
21824                __tmp.remaining(),
21825            )
21826        }
21827        __tmp.put_u32_le(self.timestamp);
21828        __tmp.put_u8(self.target_system);
21829        __tmp.put_u8(self.target_component);
21830        for val in &self.id_or_mac {
21831            __tmp.put_u8(*val);
21832        }
21833        __tmp.put_u8(self.authentication_type as u8);
21834        __tmp.put_u8(self.data_page);
21835        __tmp.put_u8(self.last_page_index);
21836        __tmp.put_u8(self.length);
21837        for val in &self.authentication_data {
21838            __tmp.put_u8(*val);
21839        }
21840        if matches!(version, MavlinkVersion::V2) {
21841            let len = __tmp.len();
21842            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21843        } else {
21844            __tmp.len()
21845        }
21846    }
21847}
21848#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21849#[doc = ""]
21850#[doc = "ID: 12900"]
21851#[derive(Debug, Clone, PartialEq)]
21852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21853#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21854#[cfg_attr(feature = "ts", derive(TS))]
21855#[cfg_attr(feature = "ts", ts(export))]
21856pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21857    #[doc = "System ID (0 for broadcast)."]
21858    pub target_system: u8,
21859    #[doc = "Component ID (0 for broadcast)."]
21860    pub target_component: u8,
21861    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21863    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21864    pub id_or_mac: [u8; 20],
21865    #[doc = "Indicates the format for the uas_id field of this message."]
21866    pub id_type: MavOdidIdType,
21867    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21868    pub ua_type: MavOdidUaType,
21869    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21870    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21871    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21872    pub uas_id: [u8; 20],
21873}
21874impl OPEN_DRONE_ID_BASIC_ID_DATA {
21875    pub const ENCODED_LEN: usize = 44usize;
21876    pub const DEFAULT: Self = Self {
21877        target_system: 0_u8,
21878        target_component: 0_u8,
21879        id_or_mac: [0_u8; 20usize],
21880        id_type: MavOdidIdType::DEFAULT,
21881        ua_type: MavOdidUaType::DEFAULT,
21882        uas_id: [0_u8; 20usize],
21883    };
21884    #[cfg(feature = "arbitrary")]
21885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21886        use arbitrary::{Arbitrary, Unstructured};
21887        let mut buf = [0u8; 1024];
21888        rng.fill_bytes(&mut buf);
21889        let mut unstructured = Unstructured::new(&buf);
21890        Self::arbitrary(&mut unstructured).unwrap_or_default()
21891    }
21892}
21893impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21894    fn default() -> Self {
21895        Self::DEFAULT.clone()
21896    }
21897}
21898impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21899    type Message = MavMessage;
21900    const ID: u32 = 12900u32;
21901    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21902    const EXTRA_CRC: u8 = 114u8;
21903    const ENCODED_LEN: usize = 44usize;
21904    fn deser(
21905        _version: MavlinkVersion,
21906        __input: &[u8],
21907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21908        let avail_len = __input.len();
21909        let mut payload_buf = [0; Self::ENCODED_LEN];
21910        let mut buf = if avail_len < Self::ENCODED_LEN {
21911            payload_buf[0..avail_len].copy_from_slice(__input);
21912            Bytes::new(&payload_buf)
21913        } else {
21914            Bytes::new(__input)
21915        };
21916        let mut __struct = Self::default();
21917        __struct.target_system = buf.get_u8()?;
21918        __struct.target_component = buf.get_u8()?;
21919        for v in &mut __struct.id_or_mac {
21920            let val = buf.get_u8()?;
21921            *v = val;
21922        }
21923        let tmp = buf.get_u8()?;
21924        __struct.id_type =
21925            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21926                enum_type: "MavOdidIdType",
21927                value: tmp as u64,
21928            })?;
21929        let tmp = buf.get_u8()?;
21930        __struct.ua_type =
21931            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21932                enum_type: "MavOdidUaType",
21933                value: tmp as u64,
21934            })?;
21935        for v in &mut __struct.uas_id {
21936            let val = buf.get_u8()?;
21937            *v = val;
21938        }
21939        Ok(__struct)
21940    }
21941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21942        let mut __tmp = BytesMut::new(bytes);
21943        #[allow(clippy::absurd_extreme_comparisons)]
21944        #[allow(unused_comparisons)]
21945        if __tmp.remaining() < Self::ENCODED_LEN {
21946            panic!(
21947                "buffer is too small (need {} bytes, but got {})",
21948                Self::ENCODED_LEN,
21949                __tmp.remaining(),
21950            )
21951        }
21952        __tmp.put_u8(self.target_system);
21953        __tmp.put_u8(self.target_component);
21954        for val in &self.id_or_mac {
21955            __tmp.put_u8(*val);
21956        }
21957        __tmp.put_u8(self.id_type as u8);
21958        __tmp.put_u8(self.ua_type as u8);
21959        for val in &self.uas_id {
21960            __tmp.put_u8(*val);
21961        }
21962        if matches!(version, MavlinkVersion::V2) {
21963            let len = __tmp.len();
21964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21965        } else {
21966            __tmp.len()
21967        }
21968    }
21969}
21970#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21971#[doc = ""]
21972#[doc = "ID: 12901"]
21973#[derive(Debug, Clone, PartialEq)]
21974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21976#[cfg_attr(feature = "ts", derive(TS))]
21977#[cfg_attr(feature = "ts", ts(export))]
21978pub struct OPEN_DRONE_ID_LOCATION_DATA {
21979    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21980    pub latitude: i32,
21981    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21982    pub longitude: i32,
21983    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21984    pub altitude_barometric: f32,
21985    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21986    pub altitude_geodetic: f32,
21987    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21988    pub height: f32,
21989    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21990    pub timestamp: f32,
21991    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21992    pub direction: u16,
21993    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21994    pub speed_horizontal: u16,
21995    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21996    pub speed_vertical: i16,
21997    #[doc = "System ID (0 for broadcast)."]
21998    pub target_system: u8,
21999    #[doc = "Component ID (0 for broadcast)."]
22000    pub target_component: u8,
22001    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22002    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22003    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22004    pub id_or_mac: [u8; 20],
22005    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22006    pub status: MavOdidStatus,
22007    #[doc = "Indicates the reference point for the height field."]
22008    pub height_reference: MavOdidHeightRef,
22009    #[doc = "The accuracy of the horizontal position."]
22010    pub horizontal_accuracy: MavOdidHorAcc,
22011    #[doc = "The accuracy of the vertical position."]
22012    pub vertical_accuracy: MavOdidVerAcc,
22013    #[doc = "The accuracy of the barometric altitude."]
22014    pub barometer_accuracy: MavOdidVerAcc,
22015    #[doc = "The accuracy of the horizontal and vertical speed."]
22016    pub speed_accuracy: MavOdidSpeedAcc,
22017    #[doc = "The accuracy of the timestamps."]
22018    pub timestamp_accuracy: MavOdidTimeAcc,
22019}
22020impl OPEN_DRONE_ID_LOCATION_DATA {
22021    pub const ENCODED_LEN: usize = 59usize;
22022    pub const DEFAULT: Self = Self {
22023        latitude: 0_i32,
22024        longitude: 0_i32,
22025        altitude_barometric: 0.0_f32,
22026        altitude_geodetic: 0.0_f32,
22027        height: 0.0_f32,
22028        timestamp: 0.0_f32,
22029        direction: 0_u16,
22030        speed_horizontal: 0_u16,
22031        speed_vertical: 0_i16,
22032        target_system: 0_u8,
22033        target_component: 0_u8,
22034        id_or_mac: [0_u8; 20usize],
22035        status: MavOdidStatus::DEFAULT,
22036        height_reference: MavOdidHeightRef::DEFAULT,
22037        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22038        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22039        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22040        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22041        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22042    };
22043    #[cfg(feature = "arbitrary")]
22044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22045        use arbitrary::{Arbitrary, Unstructured};
22046        let mut buf = [0u8; 1024];
22047        rng.fill_bytes(&mut buf);
22048        let mut unstructured = Unstructured::new(&buf);
22049        Self::arbitrary(&mut unstructured).unwrap_or_default()
22050    }
22051}
22052impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22053    fn default() -> Self {
22054        Self::DEFAULT.clone()
22055    }
22056}
22057impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22058    type Message = MavMessage;
22059    const ID: u32 = 12901u32;
22060    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22061    const EXTRA_CRC: u8 = 254u8;
22062    const ENCODED_LEN: usize = 59usize;
22063    fn deser(
22064        _version: MavlinkVersion,
22065        __input: &[u8],
22066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22067        let avail_len = __input.len();
22068        let mut payload_buf = [0; Self::ENCODED_LEN];
22069        let mut buf = if avail_len < Self::ENCODED_LEN {
22070            payload_buf[0..avail_len].copy_from_slice(__input);
22071            Bytes::new(&payload_buf)
22072        } else {
22073            Bytes::new(__input)
22074        };
22075        let mut __struct = Self::default();
22076        __struct.latitude = buf.get_i32_le()?;
22077        __struct.longitude = buf.get_i32_le()?;
22078        __struct.altitude_barometric = buf.get_f32_le()?;
22079        __struct.altitude_geodetic = buf.get_f32_le()?;
22080        __struct.height = buf.get_f32_le()?;
22081        __struct.timestamp = buf.get_f32_le()?;
22082        __struct.direction = buf.get_u16_le()?;
22083        __struct.speed_horizontal = buf.get_u16_le()?;
22084        __struct.speed_vertical = buf.get_i16_le()?;
22085        __struct.target_system = buf.get_u8()?;
22086        __struct.target_component = buf.get_u8()?;
22087        for v in &mut __struct.id_or_mac {
22088            let val = buf.get_u8()?;
22089            *v = val;
22090        }
22091        let tmp = buf.get_u8()?;
22092        __struct.status =
22093            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22094                enum_type: "MavOdidStatus",
22095                value: tmp as u64,
22096            })?;
22097        let tmp = buf.get_u8()?;
22098        __struct.height_reference =
22099            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22100                enum_type: "MavOdidHeightRef",
22101                value: tmp as u64,
22102            })?;
22103        let tmp = buf.get_u8()?;
22104        __struct.horizontal_accuracy =
22105            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22106                enum_type: "MavOdidHorAcc",
22107                value: tmp as u64,
22108            })?;
22109        let tmp = buf.get_u8()?;
22110        __struct.vertical_accuracy =
22111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22112                enum_type: "MavOdidVerAcc",
22113                value: tmp as u64,
22114            })?;
22115        let tmp = buf.get_u8()?;
22116        __struct.barometer_accuracy =
22117            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22118                enum_type: "MavOdidVerAcc",
22119                value: tmp as u64,
22120            })?;
22121        let tmp = buf.get_u8()?;
22122        __struct.speed_accuracy =
22123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22124                enum_type: "MavOdidSpeedAcc",
22125                value: tmp as u64,
22126            })?;
22127        let tmp = buf.get_u8()?;
22128        __struct.timestamp_accuracy =
22129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22130                enum_type: "MavOdidTimeAcc",
22131                value: tmp as u64,
22132            })?;
22133        Ok(__struct)
22134    }
22135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22136        let mut __tmp = BytesMut::new(bytes);
22137        #[allow(clippy::absurd_extreme_comparisons)]
22138        #[allow(unused_comparisons)]
22139        if __tmp.remaining() < Self::ENCODED_LEN {
22140            panic!(
22141                "buffer is too small (need {} bytes, but got {})",
22142                Self::ENCODED_LEN,
22143                __tmp.remaining(),
22144            )
22145        }
22146        __tmp.put_i32_le(self.latitude);
22147        __tmp.put_i32_le(self.longitude);
22148        __tmp.put_f32_le(self.altitude_barometric);
22149        __tmp.put_f32_le(self.altitude_geodetic);
22150        __tmp.put_f32_le(self.height);
22151        __tmp.put_f32_le(self.timestamp);
22152        __tmp.put_u16_le(self.direction);
22153        __tmp.put_u16_le(self.speed_horizontal);
22154        __tmp.put_i16_le(self.speed_vertical);
22155        __tmp.put_u8(self.target_system);
22156        __tmp.put_u8(self.target_component);
22157        for val in &self.id_or_mac {
22158            __tmp.put_u8(*val);
22159        }
22160        __tmp.put_u8(self.status as u8);
22161        __tmp.put_u8(self.height_reference as u8);
22162        __tmp.put_u8(self.horizontal_accuracy as u8);
22163        __tmp.put_u8(self.vertical_accuracy as u8);
22164        __tmp.put_u8(self.barometer_accuracy as u8);
22165        __tmp.put_u8(self.speed_accuracy as u8);
22166        __tmp.put_u8(self.timestamp_accuracy as u8);
22167        if matches!(version, MavlinkVersion::V2) {
22168            let len = __tmp.len();
22169            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22170        } else {
22171            __tmp.len()
22172        }
22173    }
22174}
22175#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22176#[doc = ""]
22177#[doc = "ID: 12915"]
22178#[derive(Debug, Clone, PartialEq)]
22179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22181#[cfg_attr(feature = "ts", derive(TS))]
22182#[cfg_attr(feature = "ts", ts(export))]
22183pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22184    #[doc = "System ID (0 for broadcast)."]
22185    pub target_system: u8,
22186    #[doc = "Component ID (0 for broadcast)."]
22187    pub target_component: u8,
22188    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22189    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22190    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22191    pub id_or_mac: [u8; 20],
22192    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22193    pub single_message_size: u8,
22194    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22195    pub msg_pack_size: u8,
22196    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22197    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22198    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22199    pub messages: [u8; 225],
22200}
22201impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22202    pub const ENCODED_LEN: usize = 249usize;
22203    pub const DEFAULT: Self = Self {
22204        target_system: 0_u8,
22205        target_component: 0_u8,
22206        id_or_mac: [0_u8; 20usize],
22207        single_message_size: 0_u8,
22208        msg_pack_size: 0_u8,
22209        messages: [0_u8; 225usize],
22210    };
22211    #[cfg(feature = "arbitrary")]
22212    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22213        use arbitrary::{Arbitrary, Unstructured};
22214        let mut buf = [0u8; 1024];
22215        rng.fill_bytes(&mut buf);
22216        let mut unstructured = Unstructured::new(&buf);
22217        Self::arbitrary(&mut unstructured).unwrap_or_default()
22218    }
22219}
22220impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22221    fn default() -> Self {
22222        Self::DEFAULT.clone()
22223    }
22224}
22225impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22226    type Message = MavMessage;
22227    const ID: u32 = 12915u32;
22228    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22229    const EXTRA_CRC: u8 = 94u8;
22230    const ENCODED_LEN: usize = 249usize;
22231    fn deser(
22232        _version: MavlinkVersion,
22233        __input: &[u8],
22234    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22235        let avail_len = __input.len();
22236        let mut payload_buf = [0; Self::ENCODED_LEN];
22237        let mut buf = if avail_len < Self::ENCODED_LEN {
22238            payload_buf[0..avail_len].copy_from_slice(__input);
22239            Bytes::new(&payload_buf)
22240        } else {
22241            Bytes::new(__input)
22242        };
22243        let mut __struct = Self::default();
22244        __struct.target_system = buf.get_u8()?;
22245        __struct.target_component = buf.get_u8()?;
22246        for v in &mut __struct.id_or_mac {
22247            let val = buf.get_u8()?;
22248            *v = val;
22249        }
22250        __struct.single_message_size = buf.get_u8()?;
22251        __struct.msg_pack_size = buf.get_u8()?;
22252        for v in &mut __struct.messages {
22253            let val = buf.get_u8()?;
22254            *v = val;
22255        }
22256        Ok(__struct)
22257    }
22258    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22259        let mut __tmp = BytesMut::new(bytes);
22260        #[allow(clippy::absurd_extreme_comparisons)]
22261        #[allow(unused_comparisons)]
22262        if __tmp.remaining() < Self::ENCODED_LEN {
22263            panic!(
22264                "buffer is too small (need {} bytes, but got {})",
22265                Self::ENCODED_LEN,
22266                __tmp.remaining(),
22267            )
22268        }
22269        __tmp.put_u8(self.target_system);
22270        __tmp.put_u8(self.target_component);
22271        for val in &self.id_or_mac {
22272            __tmp.put_u8(*val);
22273        }
22274        __tmp.put_u8(self.single_message_size);
22275        __tmp.put_u8(self.msg_pack_size);
22276        for val in &self.messages {
22277            __tmp.put_u8(*val);
22278        }
22279        if matches!(version, MavlinkVersion::V2) {
22280            let len = __tmp.len();
22281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22282        } else {
22283            __tmp.len()
22284        }
22285    }
22286}
22287#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22288#[doc = ""]
22289#[doc = "ID: 12905"]
22290#[derive(Debug, Clone, PartialEq)]
22291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22293#[cfg_attr(feature = "ts", derive(TS))]
22294#[cfg_attr(feature = "ts", ts(export))]
22295pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22296    #[doc = "System ID (0 for broadcast)."]
22297    pub target_system: u8,
22298    #[doc = "Component ID (0 for broadcast)."]
22299    pub target_component: u8,
22300    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22301    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22302    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22303    pub id_or_mac: [u8; 20],
22304    #[doc = "Indicates the type of the operator_id field."]
22305    pub operator_id_type: MavOdidOperatorIdType,
22306    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22307    #[cfg_attr(feature = "ts", ts(type = "string"))]
22308    pub operator_id: CharArray<20>,
22309}
22310impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22311    pub const ENCODED_LEN: usize = 43usize;
22312    pub const DEFAULT: Self = Self {
22313        target_system: 0_u8,
22314        target_component: 0_u8,
22315        id_or_mac: [0_u8; 20usize],
22316        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22317        operator_id: CharArray::new([0_u8; 20usize]),
22318    };
22319    #[cfg(feature = "arbitrary")]
22320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22321        use arbitrary::{Arbitrary, Unstructured};
22322        let mut buf = [0u8; 1024];
22323        rng.fill_bytes(&mut buf);
22324        let mut unstructured = Unstructured::new(&buf);
22325        Self::arbitrary(&mut unstructured).unwrap_or_default()
22326    }
22327}
22328impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22329    fn default() -> Self {
22330        Self::DEFAULT.clone()
22331    }
22332}
22333impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22334    type Message = MavMessage;
22335    const ID: u32 = 12905u32;
22336    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22337    const EXTRA_CRC: u8 = 49u8;
22338    const ENCODED_LEN: usize = 43usize;
22339    fn deser(
22340        _version: MavlinkVersion,
22341        __input: &[u8],
22342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22343        let avail_len = __input.len();
22344        let mut payload_buf = [0; Self::ENCODED_LEN];
22345        let mut buf = if avail_len < Self::ENCODED_LEN {
22346            payload_buf[0..avail_len].copy_from_slice(__input);
22347            Bytes::new(&payload_buf)
22348        } else {
22349            Bytes::new(__input)
22350        };
22351        let mut __struct = Self::default();
22352        __struct.target_system = buf.get_u8()?;
22353        __struct.target_component = buf.get_u8()?;
22354        for v in &mut __struct.id_or_mac {
22355            let val = buf.get_u8()?;
22356            *v = val;
22357        }
22358        let tmp = buf.get_u8()?;
22359        __struct.operator_id_type =
22360            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22361                enum_type: "MavOdidOperatorIdType",
22362                value: tmp as u64,
22363            })?;
22364        let mut tmp = [0_u8; 20usize];
22365        for v in &mut tmp {
22366            *v = buf.get_u8()?;
22367        }
22368        __struct.operator_id = CharArray::new(tmp);
22369        Ok(__struct)
22370    }
22371    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22372        let mut __tmp = BytesMut::new(bytes);
22373        #[allow(clippy::absurd_extreme_comparisons)]
22374        #[allow(unused_comparisons)]
22375        if __tmp.remaining() < Self::ENCODED_LEN {
22376            panic!(
22377                "buffer is too small (need {} bytes, but got {})",
22378                Self::ENCODED_LEN,
22379                __tmp.remaining(),
22380            )
22381        }
22382        __tmp.put_u8(self.target_system);
22383        __tmp.put_u8(self.target_component);
22384        for val in &self.id_or_mac {
22385            __tmp.put_u8(*val);
22386        }
22387        __tmp.put_u8(self.operator_id_type as u8);
22388        for val in &self.operator_id {
22389            __tmp.put_u8(*val);
22390        }
22391        if matches!(version, MavlinkVersion::V2) {
22392            let len = __tmp.len();
22393            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22394        } else {
22395            __tmp.len()
22396        }
22397    }
22398}
22399#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22400#[doc = ""]
22401#[doc = "ID: 12903"]
22402#[derive(Debug, Clone, PartialEq)]
22403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22405#[cfg_attr(feature = "ts", derive(TS))]
22406#[cfg_attr(feature = "ts", ts(export))]
22407pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22408    #[doc = "System ID (0 for broadcast)."]
22409    pub target_system: u8,
22410    #[doc = "Component ID (0 for broadcast)."]
22411    pub target_component: u8,
22412    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22413    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22414    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22415    pub id_or_mac: [u8; 20],
22416    #[doc = "Indicates the type of the description field."]
22417    pub description_type: MavOdidDescType,
22418    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22419    #[cfg_attr(feature = "ts", ts(type = "string"))]
22420    pub description: CharArray<23>,
22421}
22422impl OPEN_DRONE_ID_SELF_ID_DATA {
22423    pub const ENCODED_LEN: usize = 46usize;
22424    pub const DEFAULT: Self = Self {
22425        target_system: 0_u8,
22426        target_component: 0_u8,
22427        id_or_mac: [0_u8; 20usize],
22428        description_type: MavOdidDescType::DEFAULT,
22429        description: CharArray::new([0_u8; 23usize]),
22430    };
22431    #[cfg(feature = "arbitrary")]
22432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22433        use arbitrary::{Arbitrary, Unstructured};
22434        let mut buf = [0u8; 1024];
22435        rng.fill_bytes(&mut buf);
22436        let mut unstructured = Unstructured::new(&buf);
22437        Self::arbitrary(&mut unstructured).unwrap_or_default()
22438    }
22439}
22440impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22441    fn default() -> Self {
22442        Self::DEFAULT.clone()
22443    }
22444}
22445impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22446    type Message = MavMessage;
22447    const ID: u32 = 12903u32;
22448    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22449    const EXTRA_CRC: u8 = 249u8;
22450    const ENCODED_LEN: usize = 46usize;
22451    fn deser(
22452        _version: MavlinkVersion,
22453        __input: &[u8],
22454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22455        let avail_len = __input.len();
22456        let mut payload_buf = [0; Self::ENCODED_LEN];
22457        let mut buf = if avail_len < Self::ENCODED_LEN {
22458            payload_buf[0..avail_len].copy_from_slice(__input);
22459            Bytes::new(&payload_buf)
22460        } else {
22461            Bytes::new(__input)
22462        };
22463        let mut __struct = Self::default();
22464        __struct.target_system = buf.get_u8()?;
22465        __struct.target_component = buf.get_u8()?;
22466        for v in &mut __struct.id_or_mac {
22467            let val = buf.get_u8()?;
22468            *v = val;
22469        }
22470        let tmp = buf.get_u8()?;
22471        __struct.description_type =
22472            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22473                enum_type: "MavOdidDescType",
22474                value: tmp as u64,
22475            })?;
22476        let mut tmp = [0_u8; 23usize];
22477        for v in &mut tmp {
22478            *v = buf.get_u8()?;
22479        }
22480        __struct.description = CharArray::new(tmp);
22481        Ok(__struct)
22482    }
22483    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22484        let mut __tmp = BytesMut::new(bytes);
22485        #[allow(clippy::absurd_extreme_comparisons)]
22486        #[allow(unused_comparisons)]
22487        if __tmp.remaining() < Self::ENCODED_LEN {
22488            panic!(
22489                "buffer is too small (need {} bytes, but got {})",
22490                Self::ENCODED_LEN,
22491                __tmp.remaining(),
22492            )
22493        }
22494        __tmp.put_u8(self.target_system);
22495        __tmp.put_u8(self.target_component);
22496        for val in &self.id_or_mac {
22497            __tmp.put_u8(*val);
22498        }
22499        __tmp.put_u8(self.description_type as u8);
22500        for val in &self.description {
22501            __tmp.put_u8(*val);
22502        }
22503        if matches!(version, MavlinkVersion::V2) {
22504            let len = __tmp.len();
22505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22506        } else {
22507            __tmp.len()
22508        }
22509    }
22510}
22511#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22512#[doc = ""]
22513#[doc = "ID: 12904"]
22514#[derive(Debug, Clone, PartialEq)]
22515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22517#[cfg_attr(feature = "ts", derive(TS))]
22518#[cfg_attr(feature = "ts", ts(export))]
22519pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22520    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22521    pub operator_latitude: i32,
22522    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22523    pub operator_longitude: i32,
22524    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22525    pub area_ceiling: f32,
22526    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22527    pub area_floor: f32,
22528    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22529    pub operator_altitude_geo: f32,
22530    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22531    pub timestamp: u32,
22532    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22533    pub area_count: u16,
22534    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22535    pub area_radius: u16,
22536    #[doc = "System ID (0 for broadcast)."]
22537    pub target_system: u8,
22538    #[doc = "Component ID (0 for broadcast)."]
22539    pub target_component: u8,
22540    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22541    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22542    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22543    pub id_or_mac: [u8; 20],
22544    #[doc = "Specifies the operator location type."]
22545    pub operator_location_type: MavOdidOperatorLocationType,
22546    #[doc = "Specifies the classification type of the UA."]
22547    pub classification_type: MavOdidClassificationType,
22548    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22549    pub category_eu: MavOdidCategoryEu,
22550    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22551    pub class_eu: MavOdidClassEu,
22552}
22553impl OPEN_DRONE_ID_SYSTEM_DATA {
22554    pub const ENCODED_LEN: usize = 54usize;
22555    pub const DEFAULT: Self = Self {
22556        operator_latitude: 0_i32,
22557        operator_longitude: 0_i32,
22558        area_ceiling: 0.0_f32,
22559        area_floor: 0.0_f32,
22560        operator_altitude_geo: 0.0_f32,
22561        timestamp: 0_u32,
22562        area_count: 0_u16,
22563        area_radius: 0_u16,
22564        target_system: 0_u8,
22565        target_component: 0_u8,
22566        id_or_mac: [0_u8; 20usize],
22567        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22568        classification_type: MavOdidClassificationType::DEFAULT,
22569        category_eu: MavOdidCategoryEu::DEFAULT,
22570        class_eu: MavOdidClassEu::DEFAULT,
22571    };
22572    #[cfg(feature = "arbitrary")]
22573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22574        use arbitrary::{Arbitrary, Unstructured};
22575        let mut buf = [0u8; 1024];
22576        rng.fill_bytes(&mut buf);
22577        let mut unstructured = Unstructured::new(&buf);
22578        Self::arbitrary(&mut unstructured).unwrap_or_default()
22579    }
22580}
22581impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22582    fn default() -> Self {
22583        Self::DEFAULT.clone()
22584    }
22585}
22586impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22587    type Message = MavMessage;
22588    const ID: u32 = 12904u32;
22589    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22590    const EXTRA_CRC: u8 = 77u8;
22591    const ENCODED_LEN: usize = 54usize;
22592    fn deser(
22593        _version: MavlinkVersion,
22594        __input: &[u8],
22595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22596        let avail_len = __input.len();
22597        let mut payload_buf = [0; Self::ENCODED_LEN];
22598        let mut buf = if avail_len < Self::ENCODED_LEN {
22599            payload_buf[0..avail_len].copy_from_slice(__input);
22600            Bytes::new(&payload_buf)
22601        } else {
22602            Bytes::new(__input)
22603        };
22604        let mut __struct = Self::default();
22605        __struct.operator_latitude = buf.get_i32_le()?;
22606        __struct.operator_longitude = buf.get_i32_le()?;
22607        __struct.area_ceiling = buf.get_f32_le()?;
22608        __struct.area_floor = buf.get_f32_le()?;
22609        __struct.operator_altitude_geo = buf.get_f32_le()?;
22610        __struct.timestamp = buf.get_u32_le()?;
22611        __struct.area_count = buf.get_u16_le()?;
22612        __struct.area_radius = buf.get_u16_le()?;
22613        __struct.target_system = buf.get_u8()?;
22614        __struct.target_component = buf.get_u8()?;
22615        for v in &mut __struct.id_or_mac {
22616            let val = buf.get_u8()?;
22617            *v = val;
22618        }
22619        let tmp = buf.get_u8()?;
22620        __struct.operator_location_type =
22621            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22622                enum_type: "MavOdidOperatorLocationType",
22623                value: tmp as u64,
22624            })?;
22625        let tmp = buf.get_u8()?;
22626        __struct.classification_type =
22627            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22628                enum_type: "MavOdidClassificationType",
22629                value: tmp as u64,
22630            })?;
22631        let tmp = buf.get_u8()?;
22632        __struct.category_eu =
22633            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22634                enum_type: "MavOdidCategoryEu",
22635                value: tmp as u64,
22636            })?;
22637        let tmp = buf.get_u8()?;
22638        __struct.class_eu =
22639            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22640                enum_type: "MavOdidClassEu",
22641                value: tmp as u64,
22642            })?;
22643        Ok(__struct)
22644    }
22645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22646        let mut __tmp = BytesMut::new(bytes);
22647        #[allow(clippy::absurd_extreme_comparisons)]
22648        #[allow(unused_comparisons)]
22649        if __tmp.remaining() < Self::ENCODED_LEN {
22650            panic!(
22651                "buffer is too small (need {} bytes, but got {})",
22652                Self::ENCODED_LEN,
22653                __tmp.remaining(),
22654            )
22655        }
22656        __tmp.put_i32_le(self.operator_latitude);
22657        __tmp.put_i32_le(self.operator_longitude);
22658        __tmp.put_f32_le(self.area_ceiling);
22659        __tmp.put_f32_le(self.area_floor);
22660        __tmp.put_f32_le(self.operator_altitude_geo);
22661        __tmp.put_u32_le(self.timestamp);
22662        __tmp.put_u16_le(self.area_count);
22663        __tmp.put_u16_le(self.area_radius);
22664        __tmp.put_u8(self.target_system);
22665        __tmp.put_u8(self.target_component);
22666        for val in &self.id_or_mac {
22667            __tmp.put_u8(*val);
22668        }
22669        __tmp.put_u8(self.operator_location_type as u8);
22670        __tmp.put_u8(self.classification_type as u8);
22671        __tmp.put_u8(self.category_eu as u8);
22672        __tmp.put_u8(self.class_eu as u8);
22673        if matches!(version, MavlinkVersion::V2) {
22674            let len = __tmp.len();
22675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22676        } else {
22677            __tmp.len()
22678        }
22679    }
22680}
22681#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22682#[doc = ""]
22683#[doc = "ID: 12919"]
22684#[derive(Debug, Clone, PartialEq)]
22685#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22686#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22687#[cfg_attr(feature = "ts", derive(TS))]
22688#[cfg_attr(feature = "ts", ts(export))]
22689pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22690    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22691    pub operator_latitude: i32,
22692    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22693    pub operator_longitude: i32,
22694    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22695    pub operator_altitude_geo: f32,
22696    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22697    pub timestamp: u32,
22698    #[doc = "System ID (0 for broadcast)."]
22699    pub target_system: u8,
22700    #[doc = "Component ID (0 for broadcast)."]
22701    pub target_component: u8,
22702}
22703impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22704    pub const ENCODED_LEN: usize = 18usize;
22705    pub const DEFAULT: Self = Self {
22706        operator_latitude: 0_i32,
22707        operator_longitude: 0_i32,
22708        operator_altitude_geo: 0.0_f32,
22709        timestamp: 0_u32,
22710        target_system: 0_u8,
22711        target_component: 0_u8,
22712    };
22713    #[cfg(feature = "arbitrary")]
22714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22715        use arbitrary::{Arbitrary, Unstructured};
22716        let mut buf = [0u8; 1024];
22717        rng.fill_bytes(&mut buf);
22718        let mut unstructured = Unstructured::new(&buf);
22719        Self::arbitrary(&mut unstructured).unwrap_or_default()
22720    }
22721}
22722impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22723    fn default() -> Self {
22724        Self::DEFAULT.clone()
22725    }
22726}
22727impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22728    type Message = MavMessage;
22729    const ID: u32 = 12919u32;
22730    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22731    const EXTRA_CRC: u8 = 7u8;
22732    const ENCODED_LEN: usize = 18usize;
22733    fn deser(
22734        _version: MavlinkVersion,
22735        __input: &[u8],
22736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22737        let avail_len = __input.len();
22738        let mut payload_buf = [0; Self::ENCODED_LEN];
22739        let mut buf = if avail_len < Self::ENCODED_LEN {
22740            payload_buf[0..avail_len].copy_from_slice(__input);
22741            Bytes::new(&payload_buf)
22742        } else {
22743            Bytes::new(__input)
22744        };
22745        let mut __struct = Self::default();
22746        __struct.operator_latitude = buf.get_i32_le()?;
22747        __struct.operator_longitude = buf.get_i32_le()?;
22748        __struct.operator_altitude_geo = buf.get_f32_le()?;
22749        __struct.timestamp = buf.get_u32_le()?;
22750        __struct.target_system = buf.get_u8()?;
22751        __struct.target_component = buf.get_u8()?;
22752        Ok(__struct)
22753    }
22754    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22755        let mut __tmp = BytesMut::new(bytes);
22756        #[allow(clippy::absurd_extreme_comparisons)]
22757        #[allow(unused_comparisons)]
22758        if __tmp.remaining() < Self::ENCODED_LEN {
22759            panic!(
22760                "buffer is too small (need {} bytes, but got {})",
22761                Self::ENCODED_LEN,
22762                __tmp.remaining(),
22763            )
22764        }
22765        __tmp.put_i32_le(self.operator_latitude);
22766        __tmp.put_i32_le(self.operator_longitude);
22767        __tmp.put_f32_le(self.operator_altitude_geo);
22768        __tmp.put_u32_le(self.timestamp);
22769        __tmp.put_u8(self.target_system);
22770        __tmp.put_u8(self.target_component);
22771        if matches!(version, MavlinkVersion::V2) {
22772            let len = __tmp.len();
22773            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22774        } else {
22775            __tmp.len()
22776        }
22777    }
22778}
22779#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22780#[doc = ""]
22781#[doc = "ID: 100"]
22782#[derive(Debug, Clone, PartialEq)]
22783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22784#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22785#[cfg_attr(feature = "ts", derive(TS))]
22786#[cfg_attr(feature = "ts", ts(export))]
22787pub struct OPTICAL_FLOW_DATA {
22788    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22789    pub time_usec: u64,
22790    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22791    pub flow_comp_m_x: f32,
22792    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22793    pub flow_comp_m_y: f32,
22794    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22795    pub ground_distance: f32,
22796    #[doc = "Flow in x-sensor direction"]
22797    pub flow_x: i16,
22798    #[doc = "Flow in y-sensor direction"]
22799    pub flow_y: i16,
22800    #[doc = "Sensor ID"]
22801    pub sensor_id: u8,
22802    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22803    pub quality: u8,
22804    #[doc = "Flow rate about X axis"]
22805    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22806    pub flow_rate_x: f32,
22807    #[doc = "Flow rate about Y axis"]
22808    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22809    pub flow_rate_y: f32,
22810}
22811impl OPTICAL_FLOW_DATA {
22812    pub const ENCODED_LEN: usize = 34usize;
22813    pub const DEFAULT: Self = Self {
22814        time_usec: 0_u64,
22815        flow_comp_m_x: 0.0_f32,
22816        flow_comp_m_y: 0.0_f32,
22817        ground_distance: 0.0_f32,
22818        flow_x: 0_i16,
22819        flow_y: 0_i16,
22820        sensor_id: 0_u8,
22821        quality: 0_u8,
22822        flow_rate_x: 0.0_f32,
22823        flow_rate_y: 0.0_f32,
22824    };
22825    #[cfg(feature = "arbitrary")]
22826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22827        use arbitrary::{Arbitrary, Unstructured};
22828        let mut buf = [0u8; 1024];
22829        rng.fill_bytes(&mut buf);
22830        let mut unstructured = Unstructured::new(&buf);
22831        Self::arbitrary(&mut unstructured).unwrap_or_default()
22832    }
22833}
22834impl Default for OPTICAL_FLOW_DATA {
22835    fn default() -> Self {
22836        Self::DEFAULT.clone()
22837    }
22838}
22839impl MessageData for OPTICAL_FLOW_DATA {
22840    type Message = MavMessage;
22841    const ID: u32 = 100u32;
22842    const NAME: &'static str = "OPTICAL_FLOW";
22843    const EXTRA_CRC: u8 = 175u8;
22844    const ENCODED_LEN: usize = 34usize;
22845    fn deser(
22846        _version: MavlinkVersion,
22847        __input: &[u8],
22848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22849        let avail_len = __input.len();
22850        let mut payload_buf = [0; Self::ENCODED_LEN];
22851        let mut buf = if avail_len < Self::ENCODED_LEN {
22852            payload_buf[0..avail_len].copy_from_slice(__input);
22853            Bytes::new(&payload_buf)
22854        } else {
22855            Bytes::new(__input)
22856        };
22857        let mut __struct = Self::default();
22858        __struct.time_usec = buf.get_u64_le()?;
22859        __struct.flow_comp_m_x = buf.get_f32_le()?;
22860        __struct.flow_comp_m_y = buf.get_f32_le()?;
22861        __struct.ground_distance = buf.get_f32_le()?;
22862        __struct.flow_x = buf.get_i16_le()?;
22863        __struct.flow_y = buf.get_i16_le()?;
22864        __struct.sensor_id = buf.get_u8()?;
22865        __struct.quality = buf.get_u8()?;
22866        __struct.flow_rate_x = buf.get_f32_le()?;
22867        __struct.flow_rate_y = buf.get_f32_le()?;
22868        Ok(__struct)
22869    }
22870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22871        let mut __tmp = BytesMut::new(bytes);
22872        #[allow(clippy::absurd_extreme_comparisons)]
22873        #[allow(unused_comparisons)]
22874        if __tmp.remaining() < Self::ENCODED_LEN {
22875            panic!(
22876                "buffer is too small (need {} bytes, but got {})",
22877                Self::ENCODED_LEN,
22878                __tmp.remaining(),
22879            )
22880        }
22881        __tmp.put_u64_le(self.time_usec);
22882        __tmp.put_f32_le(self.flow_comp_m_x);
22883        __tmp.put_f32_le(self.flow_comp_m_y);
22884        __tmp.put_f32_le(self.ground_distance);
22885        __tmp.put_i16_le(self.flow_x);
22886        __tmp.put_i16_le(self.flow_y);
22887        __tmp.put_u8(self.sensor_id);
22888        __tmp.put_u8(self.quality);
22889        if matches!(version, MavlinkVersion::V2) {
22890            __tmp.put_f32_le(self.flow_rate_x);
22891            __tmp.put_f32_le(self.flow_rate_y);
22892            let len = __tmp.len();
22893            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22894        } else {
22895            __tmp.len()
22896        }
22897    }
22898}
22899#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22900#[doc = ""]
22901#[doc = "ID: 106"]
22902#[derive(Debug, Clone, PartialEq)]
22903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22905#[cfg_attr(feature = "ts", derive(TS))]
22906#[cfg_attr(feature = "ts", ts(export))]
22907pub struct OPTICAL_FLOW_RAD_DATA {
22908    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22909    pub time_usec: u64,
22910    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22911    pub integration_time_us: u32,
22912    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22913    pub integrated_x: f32,
22914    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22915    pub integrated_y: f32,
22916    #[doc = "RH rotation around X axis"]
22917    pub integrated_xgyro: f32,
22918    #[doc = "RH rotation around Y axis"]
22919    pub integrated_ygyro: f32,
22920    #[doc = "RH rotation around Z axis"]
22921    pub integrated_zgyro: f32,
22922    #[doc = "Time since the distance was sampled."]
22923    pub time_delta_distance_us: u32,
22924    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22925    pub distance: f32,
22926    #[doc = "Temperature"]
22927    pub temperature: i16,
22928    #[doc = "Sensor ID"]
22929    pub sensor_id: u8,
22930    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22931    pub quality: u8,
22932}
22933impl OPTICAL_FLOW_RAD_DATA {
22934    pub const ENCODED_LEN: usize = 44usize;
22935    pub const DEFAULT: Self = Self {
22936        time_usec: 0_u64,
22937        integration_time_us: 0_u32,
22938        integrated_x: 0.0_f32,
22939        integrated_y: 0.0_f32,
22940        integrated_xgyro: 0.0_f32,
22941        integrated_ygyro: 0.0_f32,
22942        integrated_zgyro: 0.0_f32,
22943        time_delta_distance_us: 0_u32,
22944        distance: 0.0_f32,
22945        temperature: 0_i16,
22946        sensor_id: 0_u8,
22947        quality: 0_u8,
22948    };
22949    #[cfg(feature = "arbitrary")]
22950    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22951        use arbitrary::{Arbitrary, Unstructured};
22952        let mut buf = [0u8; 1024];
22953        rng.fill_bytes(&mut buf);
22954        let mut unstructured = Unstructured::new(&buf);
22955        Self::arbitrary(&mut unstructured).unwrap_or_default()
22956    }
22957}
22958impl Default for OPTICAL_FLOW_RAD_DATA {
22959    fn default() -> Self {
22960        Self::DEFAULT.clone()
22961    }
22962}
22963impl MessageData for OPTICAL_FLOW_RAD_DATA {
22964    type Message = MavMessage;
22965    const ID: u32 = 106u32;
22966    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22967    const EXTRA_CRC: u8 = 138u8;
22968    const ENCODED_LEN: usize = 44usize;
22969    fn deser(
22970        _version: MavlinkVersion,
22971        __input: &[u8],
22972    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22973        let avail_len = __input.len();
22974        let mut payload_buf = [0; Self::ENCODED_LEN];
22975        let mut buf = if avail_len < Self::ENCODED_LEN {
22976            payload_buf[0..avail_len].copy_from_slice(__input);
22977            Bytes::new(&payload_buf)
22978        } else {
22979            Bytes::new(__input)
22980        };
22981        let mut __struct = Self::default();
22982        __struct.time_usec = buf.get_u64_le()?;
22983        __struct.integration_time_us = buf.get_u32_le()?;
22984        __struct.integrated_x = buf.get_f32_le()?;
22985        __struct.integrated_y = buf.get_f32_le()?;
22986        __struct.integrated_xgyro = buf.get_f32_le()?;
22987        __struct.integrated_ygyro = buf.get_f32_le()?;
22988        __struct.integrated_zgyro = buf.get_f32_le()?;
22989        __struct.time_delta_distance_us = buf.get_u32_le()?;
22990        __struct.distance = buf.get_f32_le()?;
22991        __struct.temperature = buf.get_i16_le()?;
22992        __struct.sensor_id = buf.get_u8()?;
22993        __struct.quality = buf.get_u8()?;
22994        Ok(__struct)
22995    }
22996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22997        let mut __tmp = BytesMut::new(bytes);
22998        #[allow(clippy::absurd_extreme_comparisons)]
22999        #[allow(unused_comparisons)]
23000        if __tmp.remaining() < Self::ENCODED_LEN {
23001            panic!(
23002                "buffer is too small (need {} bytes, but got {})",
23003                Self::ENCODED_LEN,
23004                __tmp.remaining(),
23005            )
23006        }
23007        __tmp.put_u64_le(self.time_usec);
23008        __tmp.put_u32_le(self.integration_time_us);
23009        __tmp.put_f32_le(self.integrated_x);
23010        __tmp.put_f32_le(self.integrated_y);
23011        __tmp.put_f32_le(self.integrated_xgyro);
23012        __tmp.put_f32_le(self.integrated_ygyro);
23013        __tmp.put_f32_le(self.integrated_zgyro);
23014        __tmp.put_u32_le(self.time_delta_distance_us);
23015        __tmp.put_f32_le(self.distance);
23016        __tmp.put_i16_le(self.temperature);
23017        __tmp.put_u8(self.sensor_id);
23018        __tmp.put_u8(self.quality);
23019        if matches!(version, MavlinkVersion::V2) {
23020            let len = __tmp.len();
23021            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23022        } else {
23023            __tmp.len()
23024        }
23025    }
23026}
23027#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23028#[doc = ""]
23029#[doc = "ID: 360"]
23030#[derive(Debug, Clone, PartialEq)]
23031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23033#[cfg_attr(feature = "ts", derive(TS))]
23034#[cfg_attr(feature = "ts", ts(export))]
23035pub struct ORBIT_EXECUTION_STATUS_DATA {
23036    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23037    pub time_usec: u64,
23038    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23039    pub radius: f32,
23040    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23041    pub x: i32,
23042    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23043    pub y: i32,
23044    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23045    pub z: f32,
23046    #[doc = "The coordinate system of the fields: x, y, z."]
23047    pub frame: MavFrame,
23048}
23049impl ORBIT_EXECUTION_STATUS_DATA {
23050    pub const ENCODED_LEN: usize = 25usize;
23051    pub const DEFAULT: Self = Self {
23052        time_usec: 0_u64,
23053        radius: 0.0_f32,
23054        x: 0_i32,
23055        y: 0_i32,
23056        z: 0.0_f32,
23057        frame: MavFrame::DEFAULT,
23058    };
23059    #[cfg(feature = "arbitrary")]
23060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23061        use arbitrary::{Arbitrary, Unstructured};
23062        let mut buf = [0u8; 1024];
23063        rng.fill_bytes(&mut buf);
23064        let mut unstructured = Unstructured::new(&buf);
23065        Self::arbitrary(&mut unstructured).unwrap_or_default()
23066    }
23067}
23068impl Default for ORBIT_EXECUTION_STATUS_DATA {
23069    fn default() -> Self {
23070        Self::DEFAULT.clone()
23071    }
23072}
23073impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23074    type Message = MavMessage;
23075    const ID: u32 = 360u32;
23076    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23077    const EXTRA_CRC: u8 = 11u8;
23078    const ENCODED_LEN: usize = 25usize;
23079    fn deser(
23080        _version: MavlinkVersion,
23081        __input: &[u8],
23082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23083        let avail_len = __input.len();
23084        let mut payload_buf = [0; Self::ENCODED_LEN];
23085        let mut buf = if avail_len < Self::ENCODED_LEN {
23086            payload_buf[0..avail_len].copy_from_slice(__input);
23087            Bytes::new(&payload_buf)
23088        } else {
23089            Bytes::new(__input)
23090        };
23091        let mut __struct = Self::default();
23092        __struct.time_usec = buf.get_u64_le()?;
23093        __struct.radius = buf.get_f32_le()?;
23094        __struct.x = buf.get_i32_le()?;
23095        __struct.y = buf.get_i32_le()?;
23096        __struct.z = buf.get_f32_le()?;
23097        let tmp = buf.get_u8()?;
23098        __struct.frame =
23099            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23100                enum_type: "MavFrame",
23101                value: tmp as u64,
23102            })?;
23103        Ok(__struct)
23104    }
23105    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23106        let mut __tmp = BytesMut::new(bytes);
23107        #[allow(clippy::absurd_extreme_comparisons)]
23108        #[allow(unused_comparisons)]
23109        if __tmp.remaining() < Self::ENCODED_LEN {
23110            panic!(
23111                "buffer is too small (need {} bytes, but got {})",
23112                Self::ENCODED_LEN,
23113                __tmp.remaining(),
23114            )
23115        }
23116        __tmp.put_u64_le(self.time_usec);
23117        __tmp.put_f32_le(self.radius);
23118        __tmp.put_i32_le(self.x);
23119        __tmp.put_i32_le(self.y);
23120        __tmp.put_f32_le(self.z);
23121        __tmp.put_u8(self.frame as u8);
23122        if matches!(version, MavlinkVersion::V2) {
23123            let len = __tmp.len();
23124            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23125        } else {
23126            __tmp.len()
23127        }
23128    }
23129}
23130#[doc = "Response from a PARAM_EXT_SET message."]
23131#[doc = ""]
23132#[doc = "ID: 324"]
23133#[derive(Debug, Clone, PartialEq)]
23134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23136#[cfg_attr(feature = "ts", derive(TS))]
23137#[cfg_attr(feature = "ts", ts(export))]
23138pub struct PARAM_EXT_ACK_DATA {
23139    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23140    #[cfg_attr(feature = "ts", ts(type = "string"))]
23141    pub param_id: CharArray<16>,
23142    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23143    #[cfg_attr(feature = "ts", ts(type = "string"))]
23144    pub param_value: CharArray<128>,
23145    #[doc = "Parameter type."]
23146    pub param_type: MavParamExtType,
23147    #[doc = "Result code."]
23148    pub param_result: ParamAck,
23149}
23150impl PARAM_EXT_ACK_DATA {
23151    pub const ENCODED_LEN: usize = 146usize;
23152    pub const DEFAULT: Self = Self {
23153        param_id: CharArray::new([0_u8; 16usize]),
23154        param_value: CharArray::new([0_u8; 128usize]),
23155        param_type: MavParamExtType::DEFAULT,
23156        param_result: ParamAck::DEFAULT,
23157    };
23158    #[cfg(feature = "arbitrary")]
23159    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23160        use arbitrary::{Arbitrary, Unstructured};
23161        let mut buf = [0u8; 1024];
23162        rng.fill_bytes(&mut buf);
23163        let mut unstructured = Unstructured::new(&buf);
23164        Self::arbitrary(&mut unstructured).unwrap_or_default()
23165    }
23166}
23167impl Default for PARAM_EXT_ACK_DATA {
23168    fn default() -> Self {
23169        Self::DEFAULT.clone()
23170    }
23171}
23172impl MessageData for PARAM_EXT_ACK_DATA {
23173    type Message = MavMessage;
23174    const ID: u32 = 324u32;
23175    const NAME: &'static str = "PARAM_EXT_ACK";
23176    const EXTRA_CRC: u8 = 132u8;
23177    const ENCODED_LEN: usize = 146usize;
23178    fn deser(
23179        _version: MavlinkVersion,
23180        __input: &[u8],
23181    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23182        let avail_len = __input.len();
23183        let mut payload_buf = [0; Self::ENCODED_LEN];
23184        let mut buf = if avail_len < Self::ENCODED_LEN {
23185            payload_buf[0..avail_len].copy_from_slice(__input);
23186            Bytes::new(&payload_buf)
23187        } else {
23188            Bytes::new(__input)
23189        };
23190        let mut __struct = Self::default();
23191        let mut tmp = [0_u8; 16usize];
23192        for v in &mut tmp {
23193            *v = buf.get_u8()?;
23194        }
23195        __struct.param_id = CharArray::new(tmp);
23196        let mut tmp = [0_u8; 128usize];
23197        for v in &mut tmp {
23198            *v = buf.get_u8()?;
23199        }
23200        __struct.param_value = CharArray::new(tmp);
23201        let tmp = buf.get_u8()?;
23202        __struct.param_type =
23203            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23204                enum_type: "MavParamExtType",
23205                value: tmp as u64,
23206            })?;
23207        let tmp = buf.get_u8()?;
23208        __struct.param_result =
23209            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23210                enum_type: "ParamAck",
23211                value: tmp as u64,
23212            })?;
23213        Ok(__struct)
23214    }
23215    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23216        let mut __tmp = BytesMut::new(bytes);
23217        #[allow(clippy::absurd_extreme_comparisons)]
23218        #[allow(unused_comparisons)]
23219        if __tmp.remaining() < Self::ENCODED_LEN {
23220            panic!(
23221                "buffer is too small (need {} bytes, but got {})",
23222                Self::ENCODED_LEN,
23223                __tmp.remaining(),
23224            )
23225        }
23226        for val in &self.param_id {
23227            __tmp.put_u8(*val);
23228        }
23229        for val in &self.param_value {
23230            __tmp.put_u8(*val);
23231        }
23232        __tmp.put_u8(self.param_type as u8);
23233        __tmp.put_u8(self.param_result as u8);
23234        if matches!(version, MavlinkVersion::V2) {
23235            let len = __tmp.len();
23236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23237        } else {
23238            __tmp.len()
23239        }
23240    }
23241}
23242#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23243#[doc = ""]
23244#[doc = "ID: 321"]
23245#[derive(Debug, Clone, PartialEq)]
23246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23248#[cfg_attr(feature = "ts", derive(TS))]
23249#[cfg_attr(feature = "ts", ts(export))]
23250pub struct PARAM_EXT_REQUEST_LIST_DATA {
23251    #[doc = "System ID"]
23252    pub target_system: u8,
23253    #[doc = "Component ID"]
23254    pub target_component: u8,
23255}
23256impl PARAM_EXT_REQUEST_LIST_DATA {
23257    pub const ENCODED_LEN: usize = 2usize;
23258    pub const DEFAULT: Self = Self {
23259        target_system: 0_u8,
23260        target_component: 0_u8,
23261    };
23262    #[cfg(feature = "arbitrary")]
23263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23264        use arbitrary::{Arbitrary, Unstructured};
23265        let mut buf = [0u8; 1024];
23266        rng.fill_bytes(&mut buf);
23267        let mut unstructured = Unstructured::new(&buf);
23268        Self::arbitrary(&mut unstructured).unwrap_or_default()
23269    }
23270}
23271impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23272    fn default() -> Self {
23273        Self::DEFAULT.clone()
23274    }
23275}
23276impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23277    type Message = MavMessage;
23278    const ID: u32 = 321u32;
23279    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23280    const EXTRA_CRC: u8 = 88u8;
23281    const ENCODED_LEN: usize = 2usize;
23282    fn deser(
23283        _version: MavlinkVersion,
23284        __input: &[u8],
23285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23286        let avail_len = __input.len();
23287        let mut payload_buf = [0; Self::ENCODED_LEN];
23288        let mut buf = if avail_len < Self::ENCODED_LEN {
23289            payload_buf[0..avail_len].copy_from_slice(__input);
23290            Bytes::new(&payload_buf)
23291        } else {
23292            Bytes::new(__input)
23293        };
23294        let mut __struct = Self::default();
23295        __struct.target_system = buf.get_u8()?;
23296        __struct.target_component = buf.get_u8()?;
23297        Ok(__struct)
23298    }
23299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23300        let mut __tmp = BytesMut::new(bytes);
23301        #[allow(clippy::absurd_extreme_comparisons)]
23302        #[allow(unused_comparisons)]
23303        if __tmp.remaining() < Self::ENCODED_LEN {
23304            panic!(
23305                "buffer is too small (need {} bytes, but got {})",
23306                Self::ENCODED_LEN,
23307                __tmp.remaining(),
23308            )
23309        }
23310        __tmp.put_u8(self.target_system);
23311        __tmp.put_u8(self.target_component);
23312        if matches!(version, MavlinkVersion::V2) {
23313            let len = __tmp.len();
23314            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23315        } else {
23316            __tmp.len()
23317        }
23318    }
23319}
23320#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23321#[doc = ""]
23322#[doc = "ID: 320"]
23323#[derive(Debug, Clone, PartialEq)]
23324#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23326#[cfg_attr(feature = "ts", derive(TS))]
23327#[cfg_attr(feature = "ts", ts(export))]
23328pub struct PARAM_EXT_REQUEST_READ_DATA {
23329    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23330    pub param_index: i16,
23331    #[doc = "System ID"]
23332    pub target_system: u8,
23333    #[doc = "Component ID"]
23334    pub target_component: u8,
23335    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23336    #[cfg_attr(feature = "ts", ts(type = "string"))]
23337    pub param_id: CharArray<16>,
23338}
23339impl PARAM_EXT_REQUEST_READ_DATA {
23340    pub const ENCODED_LEN: usize = 20usize;
23341    pub const DEFAULT: Self = Self {
23342        param_index: 0_i16,
23343        target_system: 0_u8,
23344        target_component: 0_u8,
23345        param_id: CharArray::new([0_u8; 16usize]),
23346    };
23347    #[cfg(feature = "arbitrary")]
23348    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23349        use arbitrary::{Arbitrary, Unstructured};
23350        let mut buf = [0u8; 1024];
23351        rng.fill_bytes(&mut buf);
23352        let mut unstructured = Unstructured::new(&buf);
23353        Self::arbitrary(&mut unstructured).unwrap_or_default()
23354    }
23355}
23356impl Default for PARAM_EXT_REQUEST_READ_DATA {
23357    fn default() -> Self {
23358        Self::DEFAULT.clone()
23359    }
23360}
23361impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23362    type Message = MavMessage;
23363    const ID: u32 = 320u32;
23364    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23365    const EXTRA_CRC: u8 = 243u8;
23366    const ENCODED_LEN: usize = 20usize;
23367    fn deser(
23368        _version: MavlinkVersion,
23369        __input: &[u8],
23370    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23371        let avail_len = __input.len();
23372        let mut payload_buf = [0; Self::ENCODED_LEN];
23373        let mut buf = if avail_len < Self::ENCODED_LEN {
23374            payload_buf[0..avail_len].copy_from_slice(__input);
23375            Bytes::new(&payload_buf)
23376        } else {
23377            Bytes::new(__input)
23378        };
23379        let mut __struct = Self::default();
23380        __struct.param_index = buf.get_i16_le()?;
23381        __struct.target_system = buf.get_u8()?;
23382        __struct.target_component = buf.get_u8()?;
23383        let mut tmp = [0_u8; 16usize];
23384        for v in &mut tmp {
23385            *v = buf.get_u8()?;
23386        }
23387        __struct.param_id = CharArray::new(tmp);
23388        Ok(__struct)
23389    }
23390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23391        let mut __tmp = BytesMut::new(bytes);
23392        #[allow(clippy::absurd_extreme_comparisons)]
23393        #[allow(unused_comparisons)]
23394        if __tmp.remaining() < Self::ENCODED_LEN {
23395            panic!(
23396                "buffer is too small (need {} bytes, but got {})",
23397                Self::ENCODED_LEN,
23398                __tmp.remaining(),
23399            )
23400        }
23401        __tmp.put_i16_le(self.param_index);
23402        __tmp.put_u8(self.target_system);
23403        __tmp.put_u8(self.target_component);
23404        for val in &self.param_id {
23405            __tmp.put_u8(*val);
23406        }
23407        if matches!(version, MavlinkVersion::V2) {
23408            let len = __tmp.len();
23409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23410        } else {
23411            __tmp.len()
23412        }
23413    }
23414}
23415#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23416#[doc = ""]
23417#[doc = "ID: 323"]
23418#[derive(Debug, Clone, PartialEq)]
23419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23421#[cfg_attr(feature = "ts", derive(TS))]
23422#[cfg_attr(feature = "ts", ts(export))]
23423pub struct PARAM_EXT_SET_DATA {
23424    #[doc = "System ID"]
23425    pub target_system: u8,
23426    #[doc = "Component ID"]
23427    pub target_component: u8,
23428    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23429    #[cfg_attr(feature = "ts", ts(type = "string"))]
23430    pub param_id: CharArray<16>,
23431    #[doc = "Parameter value"]
23432    #[cfg_attr(feature = "ts", ts(type = "string"))]
23433    pub param_value: CharArray<128>,
23434    #[doc = "Parameter type."]
23435    pub param_type: MavParamExtType,
23436}
23437impl PARAM_EXT_SET_DATA {
23438    pub const ENCODED_LEN: usize = 147usize;
23439    pub const DEFAULT: Self = Self {
23440        target_system: 0_u8,
23441        target_component: 0_u8,
23442        param_id: CharArray::new([0_u8; 16usize]),
23443        param_value: CharArray::new([0_u8; 128usize]),
23444        param_type: MavParamExtType::DEFAULT,
23445    };
23446    #[cfg(feature = "arbitrary")]
23447    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23448        use arbitrary::{Arbitrary, Unstructured};
23449        let mut buf = [0u8; 1024];
23450        rng.fill_bytes(&mut buf);
23451        let mut unstructured = Unstructured::new(&buf);
23452        Self::arbitrary(&mut unstructured).unwrap_or_default()
23453    }
23454}
23455impl Default for PARAM_EXT_SET_DATA {
23456    fn default() -> Self {
23457        Self::DEFAULT.clone()
23458    }
23459}
23460impl MessageData for PARAM_EXT_SET_DATA {
23461    type Message = MavMessage;
23462    const ID: u32 = 323u32;
23463    const NAME: &'static str = "PARAM_EXT_SET";
23464    const EXTRA_CRC: u8 = 78u8;
23465    const ENCODED_LEN: usize = 147usize;
23466    fn deser(
23467        _version: MavlinkVersion,
23468        __input: &[u8],
23469    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23470        let avail_len = __input.len();
23471        let mut payload_buf = [0; Self::ENCODED_LEN];
23472        let mut buf = if avail_len < Self::ENCODED_LEN {
23473            payload_buf[0..avail_len].copy_from_slice(__input);
23474            Bytes::new(&payload_buf)
23475        } else {
23476            Bytes::new(__input)
23477        };
23478        let mut __struct = Self::default();
23479        __struct.target_system = buf.get_u8()?;
23480        __struct.target_component = buf.get_u8()?;
23481        let mut tmp = [0_u8; 16usize];
23482        for v in &mut tmp {
23483            *v = buf.get_u8()?;
23484        }
23485        __struct.param_id = CharArray::new(tmp);
23486        let mut tmp = [0_u8; 128usize];
23487        for v in &mut tmp {
23488            *v = buf.get_u8()?;
23489        }
23490        __struct.param_value = CharArray::new(tmp);
23491        let tmp = buf.get_u8()?;
23492        __struct.param_type =
23493            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23494                enum_type: "MavParamExtType",
23495                value: tmp as u64,
23496            })?;
23497        Ok(__struct)
23498    }
23499    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23500        let mut __tmp = BytesMut::new(bytes);
23501        #[allow(clippy::absurd_extreme_comparisons)]
23502        #[allow(unused_comparisons)]
23503        if __tmp.remaining() < Self::ENCODED_LEN {
23504            panic!(
23505                "buffer is too small (need {} bytes, but got {})",
23506                Self::ENCODED_LEN,
23507                __tmp.remaining(),
23508            )
23509        }
23510        __tmp.put_u8(self.target_system);
23511        __tmp.put_u8(self.target_component);
23512        for val in &self.param_id {
23513            __tmp.put_u8(*val);
23514        }
23515        for val in &self.param_value {
23516            __tmp.put_u8(*val);
23517        }
23518        __tmp.put_u8(self.param_type as u8);
23519        if matches!(version, MavlinkVersion::V2) {
23520            let len = __tmp.len();
23521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23522        } else {
23523            __tmp.len()
23524        }
23525    }
23526}
23527#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23528#[doc = ""]
23529#[doc = "ID: 322"]
23530#[derive(Debug, Clone, PartialEq)]
23531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23533#[cfg_attr(feature = "ts", derive(TS))]
23534#[cfg_attr(feature = "ts", ts(export))]
23535pub struct PARAM_EXT_VALUE_DATA {
23536    #[doc = "Total number of parameters"]
23537    pub param_count: u16,
23538    #[doc = "Index of this parameter"]
23539    pub param_index: u16,
23540    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23541    #[cfg_attr(feature = "ts", ts(type = "string"))]
23542    pub param_id: CharArray<16>,
23543    #[doc = "Parameter value"]
23544    #[cfg_attr(feature = "ts", ts(type = "string"))]
23545    pub param_value: CharArray<128>,
23546    #[doc = "Parameter type."]
23547    pub param_type: MavParamExtType,
23548}
23549impl PARAM_EXT_VALUE_DATA {
23550    pub const ENCODED_LEN: usize = 149usize;
23551    pub const DEFAULT: Self = Self {
23552        param_count: 0_u16,
23553        param_index: 0_u16,
23554        param_id: CharArray::new([0_u8; 16usize]),
23555        param_value: CharArray::new([0_u8; 128usize]),
23556        param_type: MavParamExtType::DEFAULT,
23557    };
23558    #[cfg(feature = "arbitrary")]
23559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23560        use arbitrary::{Arbitrary, Unstructured};
23561        let mut buf = [0u8; 1024];
23562        rng.fill_bytes(&mut buf);
23563        let mut unstructured = Unstructured::new(&buf);
23564        Self::arbitrary(&mut unstructured).unwrap_or_default()
23565    }
23566}
23567impl Default for PARAM_EXT_VALUE_DATA {
23568    fn default() -> Self {
23569        Self::DEFAULT.clone()
23570    }
23571}
23572impl MessageData for PARAM_EXT_VALUE_DATA {
23573    type Message = MavMessage;
23574    const ID: u32 = 322u32;
23575    const NAME: &'static str = "PARAM_EXT_VALUE";
23576    const EXTRA_CRC: u8 = 243u8;
23577    const ENCODED_LEN: usize = 149usize;
23578    fn deser(
23579        _version: MavlinkVersion,
23580        __input: &[u8],
23581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23582        let avail_len = __input.len();
23583        let mut payload_buf = [0; Self::ENCODED_LEN];
23584        let mut buf = if avail_len < Self::ENCODED_LEN {
23585            payload_buf[0..avail_len].copy_from_slice(__input);
23586            Bytes::new(&payload_buf)
23587        } else {
23588            Bytes::new(__input)
23589        };
23590        let mut __struct = Self::default();
23591        __struct.param_count = buf.get_u16_le()?;
23592        __struct.param_index = buf.get_u16_le()?;
23593        let mut tmp = [0_u8; 16usize];
23594        for v in &mut tmp {
23595            *v = buf.get_u8()?;
23596        }
23597        __struct.param_id = CharArray::new(tmp);
23598        let mut tmp = [0_u8; 128usize];
23599        for v in &mut tmp {
23600            *v = buf.get_u8()?;
23601        }
23602        __struct.param_value = CharArray::new(tmp);
23603        let tmp = buf.get_u8()?;
23604        __struct.param_type =
23605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23606                enum_type: "MavParamExtType",
23607                value: tmp as u64,
23608            })?;
23609        Ok(__struct)
23610    }
23611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23612        let mut __tmp = BytesMut::new(bytes);
23613        #[allow(clippy::absurd_extreme_comparisons)]
23614        #[allow(unused_comparisons)]
23615        if __tmp.remaining() < Self::ENCODED_LEN {
23616            panic!(
23617                "buffer is too small (need {} bytes, but got {})",
23618                Self::ENCODED_LEN,
23619                __tmp.remaining(),
23620            )
23621        }
23622        __tmp.put_u16_le(self.param_count);
23623        __tmp.put_u16_le(self.param_index);
23624        for val in &self.param_id {
23625            __tmp.put_u8(*val);
23626        }
23627        for val in &self.param_value {
23628            __tmp.put_u8(*val);
23629        }
23630        __tmp.put_u8(self.param_type as u8);
23631        if matches!(version, MavlinkVersion::V2) {
23632            let len = __tmp.len();
23633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23634        } else {
23635            __tmp.len()
23636        }
23637    }
23638}
23639#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23640#[doc = ""]
23641#[doc = "ID: 50"]
23642#[derive(Debug, Clone, PartialEq)]
23643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23645#[cfg_attr(feature = "ts", derive(TS))]
23646#[cfg_attr(feature = "ts", ts(export))]
23647pub struct PARAM_MAP_RC_DATA {
23648    #[doc = "Initial parameter value"]
23649    pub param_value0: f32,
23650    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23651    pub scale: f32,
23652    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23653    pub param_value_min: f32,
23654    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23655    pub param_value_max: f32,
23656    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23657    pub param_index: i16,
23658    #[doc = "System ID"]
23659    pub target_system: u8,
23660    #[doc = "Component ID"]
23661    pub target_component: u8,
23662    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23663    #[cfg_attr(feature = "ts", ts(type = "string"))]
23664    pub param_id: CharArray<16>,
23665    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23666    pub parameter_rc_channel_index: u8,
23667}
23668impl PARAM_MAP_RC_DATA {
23669    pub const ENCODED_LEN: usize = 37usize;
23670    pub const DEFAULT: Self = Self {
23671        param_value0: 0.0_f32,
23672        scale: 0.0_f32,
23673        param_value_min: 0.0_f32,
23674        param_value_max: 0.0_f32,
23675        param_index: 0_i16,
23676        target_system: 0_u8,
23677        target_component: 0_u8,
23678        param_id: CharArray::new([0_u8; 16usize]),
23679        parameter_rc_channel_index: 0_u8,
23680    };
23681    #[cfg(feature = "arbitrary")]
23682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23683        use arbitrary::{Arbitrary, Unstructured};
23684        let mut buf = [0u8; 1024];
23685        rng.fill_bytes(&mut buf);
23686        let mut unstructured = Unstructured::new(&buf);
23687        Self::arbitrary(&mut unstructured).unwrap_or_default()
23688    }
23689}
23690impl Default for PARAM_MAP_RC_DATA {
23691    fn default() -> Self {
23692        Self::DEFAULT.clone()
23693    }
23694}
23695impl MessageData for PARAM_MAP_RC_DATA {
23696    type Message = MavMessage;
23697    const ID: u32 = 50u32;
23698    const NAME: &'static str = "PARAM_MAP_RC";
23699    const EXTRA_CRC: u8 = 78u8;
23700    const ENCODED_LEN: usize = 37usize;
23701    fn deser(
23702        _version: MavlinkVersion,
23703        __input: &[u8],
23704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23705        let avail_len = __input.len();
23706        let mut payload_buf = [0; Self::ENCODED_LEN];
23707        let mut buf = if avail_len < Self::ENCODED_LEN {
23708            payload_buf[0..avail_len].copy_from_slice(__input);
23709            Bytes::new(&payload_buf)
23710        } else {
23711            Bytes::new(__input)
23712        };
23713        let mut __struct = Self::default();
23714        __struct.param_value0 = buf.get_f32_le()?;
23715        __struct.scale = buf.get_f32_le()?;
23716        __struct.param_value_min = buf.get_f32_le()?;
23717        __struct.param_value_max = buf.get_f32_le()?;
23718        __struct.param_index = buf.get_i16_le()?;
23719        __struct.target_system = buf.get_u8()?;
23720        __struct.target_component = buf.get_u8()?;
23721        let mut tmp = [0_u8; 16usize];
23722        for v in &mut tmp {
23723            *v = buf.get_u8()?;
23724        }
23725        __struct.param_id = CharArray::new(tmp);
23726        __struct.parameter_rc_channel_index = buf.get_u8()?;
23727        Ok(__struct)
23728    }
23729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23730        let mut __tmp = BytesMut::new(bytes);
23731        #[allow(clippy::absurd_extreme_comparisons)]
23732        #[allow(unused_comparisons)]
23733        if __tmp.remaining() < Self::ENCODED_LEN {
23734            panic!(
23735                "buffer is too small (need {} bytes, but got {})",
23736                Self::ENCODED_LEN,
23737                __tmp.remaining(),
23738            )
23739        }
23740        __tmp.put_f32_le(self.param_value0);
23741        __tmp.put_f32_le(self.scale);
23742        __tmp.put_f32_le(self.param_value_min);
23743        __tmp.put_f32_le(self.param_value_max);
23744        __tmp.put_i16_le(self.param_index);
23745        __tmp.put_u8(self.target_system);
23746        __tmp.put_u8(self.target_component);
23747        for val in &self.param_id {
23748            __tmp.put_u8(*val);
23749        }
23750        __tmp.put_u8(self.parameter_rc_channel_index);
23751        if matches!(version, MavlinkVersion::V2) {
23752            let len = __tmp.len();
23753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23754        } else {
23755            __tmp.len()
23756        }
23757    }
23758}
23759#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23760#[doc = ""]
23761#[doc = "ID: 21"]
23762#[derive(Debug, Clone, PartialEq)]
23763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23765#[cfg_attr(feature = "ts", derive(TS))]
23766#[cfg_attr(feature = "ts", ts(export))]
23767pub struct PARAM_REQUEST_LIST_DATA {
23768    #[doc = "System ID"]
23769    pub target_system: u8,
23770    #[doc = "Component ID"]
23771    pub target_component: u8,
23772}
23773impl PARAM_REQUEST_LIST_DATA {
23774    pub const ENCODED_LEN: usize = 2usize;
23775    pub const DEFAULT: Self = Self {
23776        target_system: 0_u8,
23777        target_component: 0_u8,
23778    };
23779    #[cfg(feature = "arbitrary")]
23780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23781        use arbitrary::{Arbitrary, Unstructured};
23782        let mut buf = [0u8; 1024];
23783        rng.fill_bytes(&mut buf);
23784        let mut unstructured = Unstructured::new(&buf);
23785        Self::arbitrary(&mut unstructured).unwrap_or_default()
23786    }
23787}
23788impl Default for PARAM_REQUEST_LIST_DATA {
23789    fn default() -> Self {
23790        Self::DEFAULT.clone()
23791    }
23792}
23793impl MessageData for PARAM_REQUEST_LIST_DATA {
23794    type Message = MavMessage;
23795    const ID: u32 = 21u32;
23796    const NAME: &'static str = "PARAM_REQUEST_LIST";
23797    const EXTRA_CRC: u8 = 159u8;
23798    const ENCODED_LEN: usize = 2usize;
23799    fn deser(
23800        _version: MavlinkVersion,
23801        __input: &[u8],
23802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23803        let avail_len = __input.len();
23804        let mut payload_buf = [0; Self::ENCODED_LEN];
23805        let mut buf = if avail_len < Self::ENCODED_LEN {
23806            payload_buf[0..avail_len].copy_from_slice(__input);
23807            Bytes::new(&payload_buf)
23808        } else {
23809            Bytes::new(__input)
23810        };
23811        let mut __struct = Self::default();
23812        __struct.target_system = buf.get_u8()?;
23813        __struct.target_component = buf.get_u8()?;
23814        Ok(__struct)
23815    }
23816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23817        let mut __tmp = BytesMut::new(bytes);
23818        #[allow(clippy::absurd_extreme_comparisons)]
23819        #[allow(unused_comparisons)]
23820        if __tmp.remaining() < Self::ENCODED_LEN {
23821            panic!(
23822                "buffer is too small (need {} bytes, but got {})",
23823                Self::ENCODED_LEN,
23824                __tmp.remaining(),
23825            )
23826        }
23827        __tmp.put_u8(self.target_system);
23828        __tmp.put_u8(self.target_component);
23829        if matches!(version, MavlinkVersion::V2) {
23830            let len = __tmp.len();
23831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23832        } else {
23833            __tmp.len()
23834        }
23835    }
23836}
23837#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23838#[doc = ""]
23839#[doc = "ID: 20"]
23840#[derive(Debug, Clone, PartialEq)]
23841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23843#[cfg_attr(feature = "ts", derive(TS))]
23844#[cfg_attr(feature = "ts", ts(export))]
23845pub struct PARAM_REQUEST_READ_DATA {
23846    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23847    pub param_index: i16,
23848    #[doc = "System ID"]
23849    pub target_system: u8,
23850    #[doc = "Component ID"]
23851    pub target_component: u8,
23852    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23853    #[cfg_attr(feature = "ts", ts(type = "string"))]
23854    pub param_id: CharArray<16>,
23855}
23856impl PARAM_REQUEST_READ_DATA {
23857    pub const ENCODED_LEN: usize = 20usize;
23858    pub const DEFAULT: Self = Self {
23859        param_index: 0_i16,
23860        target_system: 0_u8,
23861        target_component: 0_u8,
23862        param_id: CharArray::new([0_u8; 16usize]),
23863    };
23864    #[cfg(feature = "arbitrary")]
23865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23866        use arbitrary::{Arbitrary, Unstructured};
23867        let mut buf = [0u8; 1024];
23868        rng.fill_bytes(&mut buf);
23869        let mut unstructured = Unstructured::new(&buf);
23870        Self::arbitrary(&mut unstructured).unwrap_or_default()
23871    }
23872}
23873impl Default for PARAM_REQUEST_READ_DATA {
23874    fn default() -> Self {
23875        Self::DEFAULT.clone()
23876    }
23877}
23878impl MessageData for PARAM_REQUEST_READ_DATA {
23879    type Message = MavMessage;
23880    const ID: u32 = 20u32;
23881    const NAME: &'static str = "PARAM_REQUEST_READ";
23882    const EXTRA_CRC: u8 = 214u8;
23883    const ENCODED_LEN: usize = 20usize;
23884    fn deser(
23885        _version: MavlinkVersion,
23886        __input: &[u8],
23887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23888        let avail_len = __input.len();
23889        let mut payload_buf = [0; Self::ENCODED_LEN];
23890        let mut buf = if avail_len < Self::ENCODED_LEN {
23891            payload_buf[0..avail_len].copy_from_slice(__input);
23892            Bytes::new(&payload_buf)
23893        } else {
23894            Bytes::new(__input)
23895        };
23896        let mut __struct = Self::default();
23897        __struct.param_index = buf.get_i16_le()?;
23898        __struct.target_system = buf.get_u8()?;
23899        __struct.target_component = buf.get_u8()?;
23900        let mut tmp = [0_u8; 16usize];
23901        for v in &mut tmp {
23902            *v = buf.get_u8()?;
23903        }
23904        __struct.param_id = CharArray::new(tmp);
23905        Ok(__struct)
23906    }
23907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23908        let mut __tmp = BytesMut::new(bytes);
23909        #[allow(clippy::absurd_extreme_comparisons)]
23910        #[allow(unused_comparisons)]
23911        if __tmp.remaining() < Self::ENCODED_LEN {
23912            panic!(
23913                "buffer is too small (need {} bytes, but got {})",
23914                Self::ENCODED_LEN,
23915                __tmp.remaining(),
23916            )
23917        }
23918        __tmp.put_i16_le(self.param_index);
23919        __tmp.put_u8(self.target_system);
23920        __tmp.put_u8(self.target_component);
23921        for val in &self.param_id {
23922            __tmp.put_u8(*val);
23923        }
23924        if matches!(version, MavlinkVersion::V2) {
23925            let len = __tmp.len();
23926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23927        } else {
23928            __tmp.len()
23929        }
23930    }
23931}
23932#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23933#[doc = ""]
23934#[doc = "ID: 23"]
23935#[derive(Debug, Clone, PartialEq)]
23936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23938#[cfg_attr(feature = "ts", derive(TS))]
23939#[cfg_attr(feature = "ts", ts(export))]
23940pub struct PARAM_SET_DATA {
23941    #[doc = "Onboard parameter value"]
23942    pub param_value: f32,
23943    #[doc = "System ID"]
23944    pub target_system: u8,
23945    #[doc = "Component ID"]
23946    pub target_component: u8,
23947    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23948    #[cfg_attr(feature = "ts", ts(type = "string"))]
23949    pub param_id: CharArray<16>,
23950    #[doc = "Onboard parameter type."]
23951    pub param_type: MavParamType,
23952}
23953impl PARAM_SET_DATA {
23954    pub const ENCODED_LEN: usize = 23usize;
23955    pub const DEFAULT: Self = Self {
23956        param_value: 0.0_f32,
23957        target_system: 0_u8,
23958        target_component: 0_u8,
23959        param_id: CharArray::new([0_u8; 16usize]),
23960        param_type: MavParamType::DEFAULT,
23961    };
23962    #[cfg(feature = "arbitrary")]
23963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23964        use arbitrary::{Arbitrary, Unstructured};
23965        let mut buf = [0u8; 1024];
23966        rng.fill_bytes(&mut buf);
23967        let mut unstructured = Unstructured::new(&buf);
23968        Self::arbitrary(&mut unstructured).unwrap_or_default()
23969    }
23970}
23971impl Default for PARAM_SET_DATA {
23972    fn default() -> Self {
23973        Self::DEFAULT.clone()
23974    }
23975}
23976impl MessageData for PARAM_SET_DATA {
23977    type Message = MavMessage;
23978    const ID: u32 = 23u32;
23979    const NAME: &'static str = "PARAM_SET";
23980    const EXTRA_CRC: u8 = 168u8;
23981    const ENCODED_LEN: usize = 23usize;
23982    fn deser(
23983        _version: MavlinkVersion,
23984        __input: &[u8],
23985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23986        let avail_len = __input.len();
23987        let mut payload_buf = [0; Self::ENCODED_LEN];
23988        let mut buf = if avail_len < Self::ENCODED_LEN {
23989            payload_buf[0..avail_len].copy_from_slice(__input);
23990            Bytes::new(&payload_buf)
23991        } else {
23992            Bytes::new(__input)
23993        };
23994        let mut __struct = Self::default();
23995        __struct.param_value = buf.get_f32_le()?;
23996        __struct.target_system = buf.get_u8()?;
23997        __struct.target_component = buf.get_u8()?;
23998        let mut tmp = [0_u8; 16usize];
23999        for v in &mut tmp {
24000            *v = buf.get_u8()?;
24001        }
24002        __struct.param_id = CharArray::new(tmp);
24003        let tmp = buf.get_u8()?;
24004        __struct.param_type =
24005            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24006                enum_type: "MavParamType",
24007                value: tmp as u64,
24008            })?;
24009        Ok(__struct)
24010    }
24011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24012        let mut __tmp = BytesMut::new(bytes);
24013        #[allow(clippy::absurd_extreme_comparisons)]
24014        #[allow(unused_comparisons)]
24015        if __tmp.remaining() < Self::ENCODED_LEN {
24016            panic!(
24017                "buffer is too small (need {} bytes, but got {})",
24018                Self::ENCODED_LEN,
24019                __tmp.remaining(),
24020            )
24021        }
24022        __tmp.put_f32_le(self.param_value);
24023        __tmp.put_u8(self.target_system);
24024        __tmp.put_u8(self.target_component);
24025        for val in &self.param_id {
24026            __tmp.put_u8(*val);
24027        }
24028        __tmp.put_u8(self.param_type as u8);
24029        if matches!(version, MavlinkVersion::V2) {
24030            let len = __tmp.len();
24031            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24032        } else {
24033            __tmp.len()
24034        }
24035    }
24036}
24037#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24038#[doc = ""]
24039#[doc = "ID: 22"]
24040#[derive(Debug, Clone, PartialEq)]
24041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24043#[cfg_attr(feature = "ts", derive(TS))]
24044#[cfg_attr(feature = "ts", ts(export))]
24045pub struct PARAM_VALUE_DATA {
24046    #[doc = "Onboard parameter value"]
24047    pub param_value: f32,
24048    #[doc = "Total number of onboard parameters"]
24049    pub param_count: u16,
24050    #[doc = "Index of this onboard parameter"]
24051    pub param_index: u16,
24052    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24053    #[cfg_attr(feature = "ts", ts(type = "string"))]
24054    pub param_id: CharArray<16>,
24055    #[doc = "Onboard parameter type."]
24056    pub param_type: MavParamType,
24057}
24058impl PARAM_VALUE_DATA {
24059    pub const ENCODED_LEN: usize = 25usize;
24060    pub const DEFAULT: Self = Self {
24061        param_value: 0.0_f32,
24062        param_count: 0_u16,
24063        param_index: 0_u16,
24064        param_id: CharArray::new([0_u8; 16usize]),
24065        param_type: MavParamType::DEFAULT,
24066    };
24067    #[cfg(feature = "arbitrary")]
24068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24069        use arbitrary::{Arbitrary, Unstructured};
24070        let mut buf = [0u8; 1024];
24071        rng.fill_bytes(&mut buf);
24072        let mut unstructured = Unstructured::new(&buf);
24073        Self::arbitrary(&mut unstructured).unwrap_or_default()
24074    }
24075}
24076impl Default for PARAM_VALUE_DATA {
24077    fn default() -> Self {
24078        Self::DEFAULT.clone()
24079    }
24080}
24081impl MessageData for PARAM_VALUE_DATA {
24082    type Message = MavMessage;
24083    const ID: u32 = 22u32;
24084    const NAME: &'static str = "PARAM_VALUE";
24085    const EXTRA_CRC: u8 = 220u8;
24086    const ENCODED_LEN: usize = 25usize;
24087    fn deser(
24088        _version: MavlinkVersion,
24089        __input: &[u8],
24090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24091        let avail_len = __input.len();
24092        let mut payload_buf = [0; Self::ENCODED_LEN];
24093        let mut buf = if avail_len < Self::ENCODED_LEN {
24094            payload_buf[0..avail_len].copy_from_slice(__input);
24095            Bytes::new(&payload_buf)
24096        } else {
24097            Bytes::new(__input)
24098        };
24099        let mut __struct = Self::default();
24100        __struct.param_value = buf.get_f32_le()?;
24101        __struct.param_count = buf.get_u16_le()?;
24102        __struct.param_index = buf.get_u16_le()?;
24103        let mut tmp = [0_u8; 16usize];
24104        for v in &mut tmp {
24105            *v = buf.get_u8()?;
24106        }
24107        __struct.param_id = CharArray::new(tmp);
24108        let tmp = buf.get_u8()?;
24109        __struct.param_type =
24110            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24111                enum_type: "MavParamType",
24112                value: tmp as u64,
24113            })?;
24114        Ok(__struct)
24115    }
24116    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24117        let mut __tmp = BytesMut::new(bytes);
24118        #[allow(clippy::absurd_extreme_comparisons)]
24119        #[allow(unused_comparisons)]
24120        if __tmp.remaining() < Self::ENCODED_LEN {
24121            panic!(
24122                "buffer is too small (need {} bytes, but got {})",
24123                Self::ENCODED_LEN,
24124                __tmp.remaining(),
24125            )
24126        }
24127        __tmp.put_f32_le(self.param_value);
24128        __tmp.put_u16_le(self.param_count);
24129        __tmp.put_u16_le(self.param_index);
24130        for val in &self.param_id {
24131            __tmp.put_u8(*val);
24132        }
24133        __tmp.put_u8(self.param_type as u8);
24134        if matches!(version, MavlinkVersion::V2) {
24135            let len = __tmp.len();
24136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24137        } else {
24138            __tmp.len()
24139        }
24140    }
24141}
24142#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24143#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24144#[doc = ""]
24145#[doc = "ID: 4"]
24146#[derive(Debug, Clone, PartialEq)]
24147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24149#[cfg_attr(feature = "ts", derive(TS))]
24150#[cfg_attr(feature = "ts", ts(export))]
24151pub struct PING_DATA {
24152    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24153    pub time_usec: u64,
24154    #[doc = "PING sequence"]
24155    pub seq: u32,
24156    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24157    pub target_system: u8,
24158    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24159    pub target_component: u8,
24160}
24161impl PING_DATA {
24162    pub const ENCODED_LEN: usize = 14usize;
24163    pub const DEFAULT: Self = Self {
24164        time_usec: 0_u64,
24165        seq: 0_u32,
24166        target_system: 0_u8,
24167        target_component: 0_u8,
24168    };
24169    #[cfg(feature = "arbitrary")]
24170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24171        use arbitrary::{Arbitrary, Unstructured};
24172        let mut buf = [0u8; 1024];
24173        rng.fill_bytes(&mut buf);
24174        let mut unstructured = Unstructured::new(&buf);
24175        Self::arbitrary(&mut unstructured).unwrap_or_default()
24176    }
24177}
24178impl Default for PING_DATA {
24179    fn default() -> Self {
24180        Self::DEFAULT.clone()
24181    }
24182}
24183impl MessageData for PING_DATA {
24184    type Message = MavMessage;
24185    const ID: u32 = 4u32;
24186    const NAME: &'static str = "PING";
24187    const EXTRA_CRC: u8 = 237u8;
24188    const ENCODED_LEN: usize = 14usize;
24189    fn deser(
24190        _version: MavlinkVersion,
24191        __input: &[u8],
24192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24193        let avail_len = __input.len();
24194        let mut payload_buf = [0; Self::ENCODED_LEN];
24195        let mut buf = if avail_len < Self::ENCODED_LEN {
24196            payload_buf[0..avail_len].copy_from_slice(__input);
24197            Bytes::new(&payload_buf)
24198        } else {
24199            Bytes::new(__input)
24200        };
24201        let mut __struct = Self::default();
24202        __struct.time_usec = buf.get_u64_le()?;
24203        __struct.seq = buf.get_u32_le()?;
24204        __struct.target_system = buf.get_u8()?;
24205        __struct.target_component = buf.get_u8()?;
24206        Ok(__struct)
24207    }
24208    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24209        let mut __tmp = BytesMut::new(bytes);
24210        #[allow(clippy::absurd_extreme_comparisons)]
24211        #[allow(unused_comparisons)]
24212        if __tmp.remaining() < Self::ENCODED_LEN {
24213            panic!(
24214                "buffer is too small (need {} bytes, but got {})",
24215                Self::ENCODED_LEN,
24216                __tmp.remaining(),
24217            )
24218        }
24219        __tmp.put_u64_le(self.time_usec);
24220        __tmp.put_u32_le(self.seq);
24221        __tmp.put_u8(self.target_system);
24222        __tmp.put_u8(self.target_component);
24223        if matches!(version, MavlinkVersion::V2) {
24224            let len = __tmp.len();
24225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24226        } else {
24227            __tmp.len()
24228        }
24229    }
24230}
24231#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24232#[doc = "Control vehicle tone generation (buzzer)."]
24233#[doc = ""]
24234#[doc = "ID: 258"]
24235#[derive(Debug, Clone, PartialEq)]
24236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24237#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24238#[cfg_attr(feature = "ts", derive(TS))]
24239#[cfg_attr(feature = "ts", ts(export))]
24240pub struct PLAY_TUNE_DATA {
24241    #[doc = "System ID"]
24242    pub target_system: u8,
24243    #[doc = "Component ID"]
24244    pub target_component: u8,
24245    #[doc = "tune in board specific format"]
24246    #[cfg_attr(feature = "ts", ts(type = "string"))]
24247    pub tune: CharArray<30>,
24248    #[doc = "tune extension (appended to tune)"]
24249    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24250    #[cfg_attr(feature = "ts", ts(type = "string"))]
24251    pub tune2: CharArray<200>,
24252}
24253impl PLAY_TUNE_DATA {
24254    pub const ENCODED_LEN: usize = 232usize;
24255    pub const DEFAULT: Self = Self {
24256        target_system: 0_u8,
24257        target_component: 0_u8,
24258        tune: CharArray::new([0_u8; 30usize]),
24259        tune2: CharArray::new([0_u8; 200usize]),
24260    };
24261    #[cfg(feature = "arbitrary")]
24262    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24263        use arbitrary::{Arbitrary, Unstructured};
24264        let mut buf = [0u8; 1024];
24265        rng.fill_bytes(&mut buf);
24266        let mut unstructured = Unstructured::new(&buf);
24267        Self::arbitrary(&mut unstructured).unwrap_or_default()
24268    }
24269}
24270impl Default for PLAY_TUNE_DATA {
24271    fn default() -> Self {
24272        Self::DEFAULT.clone()
24273    }
24274}
24275impl MessageData for PLAY_TUNE_DATA {
24276    type Message = MavMessage;
24277    const ID: u32 = 258u32;
24278    const NAME: &'static str = "PLAY_TUNE";
24279    const EXTRA_CRC: u8 = 187u8;
24280    const ENCODED_LEN: usize = 232usize;
24281    fn deser(
24282        _version: MavlinkVersion,
24283        __input: &[u8],
24284    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24285        let avail_len = __input.len();
24286        let mut payload_buf = [0; Self::ENCODED_LEN];
24287        let mut buf = if avail_len < Self::ENCODED_LEN {
24288            payload_buf[0..avail_len].copy_from_slice(__input);
24289            Bytes::new(&payload_buf)
24290        } else {
24291            Bytes::new(__input)
24292        };
24293        let mut __struct = Self::default();
24294        __struct.target_system = buf.get_u8()?;
24295        __struct.target_component = buf.get_u8()?;
24296        let mut tmp = [0_u8; 30usize];
24297        for v in &mut tmp {
24298            *v = buf.get_u8()?;
24299        }
24300        __struct.tune = CharArray::new(tmp);
24301        let mut tmp = [0_u8; 200usize];
24302        for v in &mut tmp {
24303            *v = buf.get_u8()?;
24304        }
24305        __struct.tune2 = CharArray::new(tmp);
24306        Ok(__struct)
24307    }
24308    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24309        let mut __tmp = BytesMut::new(bytes);
24310        #[allow(clippy::absurd_extreme_comparisons)]
24311        #[allow(unused_comparisons)]
24312        if __tmp.remaining() < Self::ENCODED_LEN {
24313            panic!(
24314                "buffer is too small (need {} bytes, but got {})",
24315                Self::ENCODED_LEN,
24316                __tmp.remaining(),
24317            )
24318        }
24319        __tmp.put_u8(self.target_system);
24320        __tmp.put_u8(self.target_component);
24321        for val in &self.tune {
24322            __tmp.put_u8(*val);
24323        }
24324        if matches!(version, MavlinkVersion::V2) {
24325            for val in &self.tune2 {
24326                __tmp.put_u8(*val);
24327            }
24328            let len = __tmp.len();
24329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24330        } else {
24331            __tmp.len()
24332        }
24333    }
24334}
24335#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24336#[doc = ""]
24337#[doc = "ID: 400"]
24338#[derive(Debug, Clone, PartialEq)]
24339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24341#[cfg_attr(feature = "ts", derive(TS))]
24342#[cfg_attr(feature = "ts", ts(export))]
24343pub struct PLAY_TUNE_V2_DATA {
24344    #[doc = "Tune format"]
24345    pub format: TuneFormat,
24346    #[doc = "System ID"]
24347    pub target_system: u8,
24348    #[doc = "Component ID"]
24349    pub target_component: u8,
24350    #[doc = "Tune definition as a NULL-terminated string."]
24351    #[cfg_attr(feature = "ts", ts(type = "string"))]
24352    pub tune: CharArray<248>,
24353}
24354impl PLAY_TUNE_V2_DATA {
24355    pub const ENCODED_LEN: usize = 254usize;
24356    pub const DEFAULT: Self = Self {
24357        format: TuneFormat::DEFAULT,
24358        target_system: 0_u8,
24359        target_component: 0_u8,
24360        tune: CharArray::new([0_u8; 248usize]),
24361    };
24362    #[cfg(feature = "arbitrary")]
24363    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24364        use arbitrary::{Arbitrary, Unstructured};
24365        let mut buf = [0u8; 1024];
24366        rng.fill_bytes(&mut buf);
24367        let mut unstructured = Unstructured::new(&buf);
24368        Self::arbitrary(&mut unstructured).unwrap_or_default()
24369    }
24370}
24371impl Default for PLAY_TUNE_V2_DATA {
24372    fn default() -> Self {
24373        Self::DEFAULT.clone()
24374    }
24375}
24376impl MessageData for PLAY_TUNE_V2_DATA {
24377    type Message = MavMessage;
24378    const ID: u32 = 400u32;
24379    const NAME: &'static str = "PLAY_TUNE_V2";
24380    const EXTRA_CRC: u8 = 110u8;
24381    const ENCODED_LEN: usize = 254usize;
24382    fn deser(
24383        _version: MavlinkVersion,
24384        __input: &[u8],
24385    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24386        let avail_len = __input.len();
24387        let mut payload_buf = [0; Self::ENCODED_LEN];
24388        let mut buf = if avail_len < Self::ENCODED_LEN {
24389            payload_buf[0..avail_len].copy_from_slice(__input);
24390            Bytes::new(&payload_buf)
24391        } else {
24392            Bytes::new(__input)
24393        };
24394        let mut __struct = Self::default();
24395        let tmp = buf.get_u32_le()?;
24396        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24397            ::mavlink_core::error::ParserError::InvalidEnum {
24398                enum_type: "TuneFormat",
24399                value: tmp as u64,
24400            },
24401        )?;
24402        __struct.target_system = buf.get_u8()?;
24403        __struct.target_component = buf.get_u8()?;
24404        let mut tmp = [0_u8; 248usize];
24405        for v in &mut tmp {
24406            *v = buf.get_u8()?;
24407        }
24408        __struct.tune = CharArray::new(tmp);
24409        Ok(__struct)
24410    }
24411    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24412        let mut __tmp = BytesMut::new(bytes);
24413        #[allow(clippy::absurd_extreme_comparisons)]
24414        #[allow(unused_comparisons)]
24415        if __tmp.remaining() < Self::ENCODED_LEN {
24416            panic!(
24417                "buffer is too small (need {} bytes, but got {})",
24418                Self::ENCODED_LEN,
24419                __tmp.remaining(),
24420            )
24421        }
24422        __tmp.put_u32_le(self.format as u32);
24423        __tmp.put_u8(self.target_system);
24424        __tmp.put_u8(self.target_component);
24425        for val in &self.tune {
24426            __tmp.put_u8(*val);
24427        }
24428        if matches!(version, MavlinkVersion::V2) {
24429            let len = __tmp.len();
24430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24431        } else {
24432            __tmp.len()
24433        }
24434    }
24435}
24436#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24437#[doc = ""]
24438#[doc = "ID: 87"]
24439#[derive(Debug, Clone, PartialEq)]
24440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24442#[cfg_attr(feature = "ts", derive(TS))]
24443#[cfg_attr(feature = "ts", ts(export))]
24444pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24445    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24446    pub time_boot_ms: u32,
24447    #[doc = "Latitude in WGS84 frame"]
24448    pub lat_int: i32,
24449    #[doc = "Longitude in WGS84 frame"]
24450    pub lon_int: i32,
24451    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24452    pub alt: f32,
24453    #[doc = "X velocity in NED frame"]
24454    pub vx: f32,
24455    #[doc = "Y velocity in NED frame"]
24456    pub vy: f32,
24457    #[doc = "Z velocity in NED frame"]
24458    pub vz: f32,
24459    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24460    pub afx: f32,
24461    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24462    pub afy: f32,
24463    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24464    pub afz: f32,
24465    #[doc = "yaw setpoint"]
24466    pub yaw: f32,
24467    #[doc = "yaw rate setpoint"]
24468    pub yaw_rate: f32,
24469    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24470    pub type_mask: PositionTargetTypemask,
24471    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24472    pub coordinate_frame: MavFrame,
24473}
24474impl POSITION_TARGET_GLOBAL_INT_DATA {
24475    pub const ENCODED_LEN: usize = 51usize;
24476    pub const DEFAULT: Self = Self {
24477        time_boot_ms: 0_u32,
24478        lat_int: 0_i32,
24479        lon_int: 0_i32,
24480        alt: 0.0_f32,
24481        vx: 0.0_f32,
24482        vy: 0.0_f32,
24483        vz: 0.0_f32,
24484        afx: 0.0_f32,
24485        afy: 0.0_f32,
24486        afz: 0.0_f32,
24487        yaw: 0.0_f32,
24488        yaw_rate: 0.0_f32,
24489        type_mask: PositionTargetTypemask::DEFAULT,
24490        coordinate_frame: MavFrame::DEFAULT,
24491    };
24492    #[cfg(feature = "arbitrary")]
24493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24494        use arbitrary::{Arbitrary, Unstructured};
24495        let mut buf = [0u8; 1024];
24496        rng.fill_bytes(&mut buf);
24497        let mut unstructured = Unstructured::new(&buf);
24498        Self::arbitrary(&mut unstructured).unwrap_or_default()
24499    }
24500}
24501impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24502    fn default() -> Self {
24503        Self::DEFAULT.clone()
24504    }
24505}
24506impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24507    type Message = MavMessage;
24508    const ID: u32 = 87u32;
24509    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24510    const EXTRA_CRC: u8 = 150u8;
24511    const ENCODED_LEN: usize = 51usize;
24512    fn deser(
24513        _version: MavlinkVersion,
24514        __input: &[u8],
24515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24516        let avail_len = __input.len();
24517        let mut payload_buf = [0; Self::ENCODED_LEN];
24518        let mut buf = if avail_len < Self::ENCODED_LEN {
24519            payload_buf[0..avail_len].copy_from_slice(__input);
24520            Bytes::new(&payload_buf)
24521        } else {
24522            Bytes::new(__input)
24523        };
24524        let mut __struct = Self::default();
24525        __struct.time_boot_ms = buf.get_u32_le()?;
24526        __struct.lat_int = buf.get_i32_le()?;
24527        __struct.lon_int = buf.get_i32_le()?;
24528        __struct.alt = buf.get_f32_le()?;
24529        __struct.vx = buf.get_f32_le()?;
24530        __struct.vy = buf.get_f32_le()?;
24531        __struct.vz = buf.get_f32_le()?;
24532        __struct.afx = buf.get_f32_le()?;
24533        __struct.afy = buf.get_f32_le()?;
24534        __struct.afz = buf.get_f32_le()?;
24535        __struct.yaw = buf.get_f32_le()?;
24536        __struct.yaw_rate = buf.get_f32_le()?;
24537        let tmp = buf.get_u16_le()?;
24538        __struct.type_mask =
24539            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24540                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24541                    flag_type: "PositionTargetTypemask",
24542                    value: tmp as u64,
24543                })?;
24544        let tmp = buf.get_u8()?;
24545        __struct.coordinate_frame =
24546            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24547                enum_type: "MavFrame",
24548                value: tmp as u64,
24549            })?;
24550        Ok(__struct)
24551    }
24552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24553        let mut __tmp = BytesMut::new(bytes);
24554        #[allow(clippy::absurd_extreme_comparisons)]
24555        #[allow(unused_comparisons)]
24556        if __tmp.remaining() < Self::ENCODED_LEN {
24557            panic!(
24558                "buffer is too small (need {} bytes, but got {})",
24559                Self::ENCODED_LEN,
24560                __tmp.remaining(),
24561            )
24562        }
24563        __tmp.put_u32_le(self.time_boot_ms);
24564        __tmp.put_i32_le(self.lat_int);
24565        __tmp.put_i32_le(self.lon_int);
24566        __tmp.put_f32_le(self.alt);
24567        __tmp.put_f32_le(self.vx);
24568        __tmp.put_f32_le(self.vy);
24569        __tmp.put_f32_le(self.vz);
24570        __tmp.put_f32_le(self.afx);
24571        __tmp.put_f32_le(self.afy);
24572        __tmp.put_f32_le(self.afz);
24573        __tmp.put_f32_le(self.yaw);
24574        __tmp.put_f32_le(self.yaw_rate);
24575        __tmp.put_u16_le(self.type_mask.bits() as u16);
24576        __tmp.put_u8(self.coordinate_frame as u8);
24577        if matches!(version, MavlinkVersion::V2) {
24578            let len = __tmp.len();
24579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24580        } else {
24581            __tmp.len()
24582        }
24583    }
24584}
24585#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24586#[doc = ""]
24587#[doc = "ID: 85"]
24588#[derive(Debug, Clone, PartialEq)]
24589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24591#[cfg_attr(feature = "ts", derive(TS))]
24592#[cfg_attr(feature = "ts", ts(export))]
24593pub struct POSITION_TARGET_LOCAL_NED_DATA {
24594    #[doc = "Timestamp (time since system boot)."]
24595    pub time_boot_ms: u32,
24596    #[doc = "X Position in NED frame"]
24597    pub x: f32,
24598    #[doc = "Y Position in NED frame"]
24599    pub y: f32,
24600    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24601    pub z: f32,
24602    #[doc = "X velocity in NED frame"]
24603    pub vx: f32,
24604    #[doc = "Y velocity in NED frame"]
24605    pub vy: f32,
24606    #[doc = "Z velocity in NED frame"]
24607    pub vz: f32,
24608    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24609    pub afx: f32,
24610    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24611    pub afy: f32,
24612    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24613    pub afz: f32,
24614    #[doc = "yaw setpoint"]
24615    pub yaw: f32,
24616    #[doc = "yaw rate setpoint"]
24617    pub yaw_rate: f32,
24618    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24619    pub type_mask: PositionTargetTypemask,
24620    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24621    pub coordinate_frame: MavFrame,
24622}
24623impl POSITION_TARGET_LOCAL_NED_DATA {
24624    pub const ENCODED_LEN: usize = 51usize;
24625    pub const DEFAULT: Self = Self {
24626        time_boot_ms: 0_u32,
24627        x: 0.0_f32,
24628        y: 0.0_f32,
24629        z: 0.0_f32,
24630        vx: 0.0_f32,
24631        vy: 0.0_f32,
24632        vz: 0.0_f32,
24633        afx: 0.0_f32,
24634        afy: 0.0_f32,
24635        afz: 0.0_f32,
24636        yaw: 0.0_f32,
24637        yaw_rate: 0.0_f32,
24638        type_mask: PositionTargetTypemask::DEFAULT,
24639        coordinate_frame: MavFrame::DEFAULT,
24640    };
24641    #[cfg(feature = "arbitrary")]
24642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24643        use arbitrary::{Arbitrary, Unstructured};
24644        let mut buf = [0u8; 1024];
24645        rng.fill_bytes(&mut buf);
24646        let mut unstructured = Unstructured::new(&buf);
24647        Self::arbitrary(&mut unstructured).unwrap_or_default()
24648    }
24649}
24650impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24651    fn default() -> Self {
24652        Self::DEFAULT.clone()
24653    }
24654}
24655impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24656    type Message = MavMessage;
24657    const ID: u32 = 85u32;
24658    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24659    const EXTRA_CRC: u8 = 140u8;
24660    const ENCODED_LEN: usize = 51usize;
24661    fn deser(
24662        _version: MavlinkVersion,
24663        __input: &[u8],
24664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24665        let avail_len = __input.len();
24666        let mut payload_buf = [0; Self::ENCODED_LEN];
24667        let mut buf = if avail_len < Self::ENCODED_LEN {
24668            payload_buf[0..avail_len].copy_from_slice(__input);
24669            Bytes::new(&payload_buf)
24670        } else {
24671            Bytes::new(__input)
24672        };
24673        let mut __struct = Self::default();
24674        __struct.time_boot_ms = buf.get_u32_le()?;
24675        __struct.x = buf.get_f32_le()?;
24676        __struct.y = buf.get_f32_le()?;
24677        __struct.z = buf.get_f32_le()?;
24678        __struct.vx = buf.get_f32_le()?;
24679        __struct.vy = buf.get_f32_le()?;
24680        __struct.vz = buf.get_f32_le()?;
24681        __struct.afx = buf.get_f32_le()?;
24682        __struct.afy = buf.get_f32_le()?;
24683        __struct.afz = buf.get_f32_le()?;
24684        __struct.yaw = buf.get_f32_le()?;
24685        __struct.yaw_rate = buf.get_f32_le()?;
24686        let tmp = buf.get_u16_le()?;
24687        __struct.type_mask =
24688            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24689                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24690                    flag_type: "PositionTargetTypemask",
24691                    value: tmp as u64,
24692                })?;
24693        let tmp = buf.get_u8()?;
24694        __struct.coordinate_frame =
24695            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24696                enum_type: "MavFrame",
24697                value: tmp as u64,
24698            })?;
24699        Ok(__struct)
24700    }
24701    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24702        let mut __tmp = BytesMut::new(bytes);
24703        #[allow(clippy::absurd_extreme_comparisons)]
24704        #[allow(unused_comparisons)]
24705        if __tmp.remaining() < Self::ENCODED_LEN {
24706            panic!(
24707                "buffer is too small (need {} bytes, but got {})",
24708                Self::ENCODED_LEN,
24709                __tmp.remaining(),
24710            )
24711        }
24712        __tmp.put_u32_le(self.time_boot_ms);
24713        __tmp.put_f32_le(self.x);
24714        __tmp.put_f32_le(self.y);
24715        __tmp.put_f32_le(self.z);
24716        __tmp.put_f32_le(self.vx);
24717        __tmp.put_f32_le(self.vy);
24718        __tmp.put_f32_le(self.vz);
24719        __tmp.put_f32_le(self.afx);
24720        __tmp.put_f32_le(self.afy);
24721        __tmp.put_f32_le(self.afz);
24722        __tmp.put_f32_le(self.yaw);
24723        __tmp.put_f32_le(self.yaw_rate);
24724        __tmp.put_u16_le(self.type_mask.bits() as u16);
24725        __tmp.put_u8(self.coordinate_frame as u8);
24726        if matches!(version, MavlinkVersion::V2) {
24727            let len = __tmp.len();
24728            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24729        } else {
24730            __tmp.len()
24731        }
24732    }
24733}
24734#[doc = "Power supply status."]
24735#[doc = ""]
24736#[doc = "ID: 125"]
24737#[derive(Debug, Clone, PartialEq)]
24738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24740#[cfg_attr(feature = "ts", derive(TS))]
24741#[cfg_attr(feature = "ts", ts(export))]
24742pub struct POWER_STATUS_DATA {
24743    #[doc = "5V rail voltage."]
24744    pub Vcc: u16,
24745    #[doc = "Servo rail voltage."]
24746    pub Vservo: u16,
24747    #[doc = "Bitmap of power supply status flags."]
24748    pub flags: MavPowerStatus,
24749}
24750impl POWER_STATUS_DATA {
24751    pub const ENCODED_LEN: usize = 6usize;
24752    pub const DEFAULT: Self = Self {
24753        Vcc: 0_u16,
24754        Vservo: 0_u16,
24755        flags: MavPowerStatus::DEFAULT,
24756    };
24757    #[cfg(feature = "arbitrary")]
24758    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24759        use arbitrary::{Arbitrary, Unstructured};
24760        let mut buf = [0u8; 1024];
24761        rng.fill_bytes(&mut buf);
24762        let mut unstructured = Unstructured::new(&buf);
24763        Self::arbitrary(&mut unstructured).unwrap_or_default()
24764    }
24765}
24766impl Default for POWER_STATUS_DATA {
24767    fn default() -> Self {
24768        Self::DEFAULT.clone()
24769    }
24770}
24771impl MessageData for POWER_STATUS_DATA {
24772    type Message = MavMessage;
24773    const ID: u32 = 125u32;
24774    const NAME: &'static str = "POWER_STATUS";
24775    const EXTRA_CRC: u8 = 203u8;
24776    const ENCODED_LEN: usize = 6usize;
24777    fn deser(
24778        _version: MavlinkVersion,
24779        __input: &[u8],
24780    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24781        let avail_len = __input.len();
24782        let mut payload_buf = [0; Self::ENCODED_LEN];
24783        let mut buf = if avail_len < Self::ENCODED_LEN {
24784            payload_buf[0..avail_len].copy_from_slice(__input);
24785            Bytes::new(&payload_buf)
24786        } else {
24787            Bytes::new(__input)
24788        };
24789        let mut __struct = Self::default();
24790        __struct.Vcc = buf.get_u16_le()?;
24791        __struct.Vservo = buf.get_u16_le()?;
24792        let tmp = buf.get_u16_le()?;
24793        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
24794            ::mavlink_core::error::ParserError::InvalidFlag {
24795                flag_type: "MavPowerStatus",
24796                value: tmp as u64,
24797            },
24798        )?;
24799        Ok(__struct)
24800    }
24801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24802        let mut __tmp = BytesMut::new(bytes);
24803        #[allow(clippy::absurd_extreme_comparisons)]
24804        #[allow(unused_comparisons)]
24805        if __tmp.remaining() < Self::ENCODED_LEN {
24806            panic!(
24807                "buffer is too small (need {} bytes, but got {})",
24808                Self::ENCODED_LEN,
24809                __tmp.remaining(),
24810            )
24811        }
24812        __tmp.put_u16_le(self.Vcc);
24813        __tmp.put_u16_le(self.Vservo);
24814        __tmp.put_u16_le(self.flags.bits() as u16);
24815        if matches!(version, MavlinkVersion::V2) {
24816            let len = __tmp.len();
24817            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24818        } else {
24819            __tmp.len()
24820        }
24821    }
24822}
24823#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24824#[doc = ""]
24825#[doc = "ID: 300"]
24826#[derive(Debug, Clone, PartialEq)]
24827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24829#[cfg_attr(feature = "ts", derive(TS))]
24830#[cfg_attr(feature = "ts", ts(export))]
24831pub struct PROTOCOL_VERSION_DATA {
24832    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24833    pub version: u16,
24834    #[doc = "Minimum MAVLink version supported"]
24835    pub min_version: u16,
24836    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24837    pub max_version: u16,
24838    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24840    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24841    pub spec_version_hash: [u8; 8],
24842    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24844    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24845    pub library_version_hash: [u8; 8],
24846}
24847impl PROTOCOL_VERSION_DATA {
24848    pub const ENCODED_LEN: usize = 22usize;
24849    pub const DEFAULT: Self = Self {
24850        version: 0_u16,
24851        min_version: 0_u16,
24852        max_version: 0_u16,
24853        spec_version_hash: [0_u8; 8usize],
24854        library_version_hash: [0_u8; 8usize],
24855    };
24856    #[cfg(feature = "arbitrary")]
24857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24858        use arbitrary::{Arbitrary, Unstructured};
24859        let mut buf = [0u8; 1024];
24860        rng.fill_bytes(&mut buf);
24861        let mut unstructured = Unstructured::new(&buf);
24862        Self::arbitrary(&mut unstructured).unwrap_or_default()
24863    }
24864}
24865impl Default for PROTOCOL_VERSION_DATA {
24866    fn default() -> Self {
24867        Self::DEFAULT.clone()
24868    }
24869}
24870impl MessageData for PROTOCOL_VERSION_DATA {
24871    type Message = MavMessage;
24872    const ID: u32 = 300u32;
24873    const NAME: &'static str = "PROTOCOL_VERSION";
24874    const EXTRA_CRC: u8 = 217u8;
24875    const ENCODED_LEN: usize = 22usize;
24876    fn deser(
24877        _version: MavlinkVersion,
24878        __input: &[u8],
24879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24880        let avail_len = __input.len();
24881        let mut payload_buf = [0; Self::ENCODED_LEN];
24882        let mut buf = if avail_len < Self::ENCODED_LEN {
24883            payload_buf[0..avail_len].copy_from_slice(__input);
24884            Bytes::new(&payload_buf)
24885        } else {
24886            Bytes::new(__input)
24887        };
24888        let mut __struct = Self::default();
24889        __struct.version = buf.get_u16_le()?;
24890        __struct.min_version = buf.get_u16_le()?;
24891        __struct.max_version = buf.get_u16_le()?;
24892        for v in &mut __struct.spec_version_hash {
24893            let val = buf.get_u8()?;
24894            *v = val;
24895        }
24896        for v in &mut __struct.library_version_hash {
24897            let val = buf.get_u8()?;
24898            *v = val;
24899        }
24900        Ok(__struct)
24901    }
24902    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24903        let mut __tmp = BytesMut::new(bytes);
24904        #[allow(clippy::absurd_extreme_comparisons)]
24905        #[allow(unused_comparisons)]
24906        if __tmp.remaining() < Self::ENCODED_LEN {
24907            panic!(
24908                "buffer is too small (need {} bytes, but got {})",
24909                Self::ENCODED_LEN,
24910                __tmp.remaining(),
24911            )
24912        }
24913        __tmp.put_u16_le(self.version);
24914        __tmp.put_u16_le(self.min_version);
24915        __tmp.put_u16_le(self.max_version);
24916        for val in &self.spec_version_hash {
24917            __tmp.put_u8(*val);
24918        }
24919        for val in &self.library_version_hash {
24920            __tmp.put_u8(*val);
24921        }
24922        if matches!(version, MavlinkVersion::V2) {
24923            let len = __tmp.len();
24924            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24925        } else {
24926            __tmp.len()
24927        }
24928    }
24929}
24930#[doc = "Complete set of calibration parameters for the radio."]
24931#[doc = ""]
24932#[doc = "ID: 221"]
24933#[derive(Debug, Clone, PartialEq)]
24934#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24935#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24936#[cfg_attr(feature = "ts", derive(TS))]
24937#[cfg_attr(feature = "ts", ts(export))]
24938pub struct RADIO_CALIBRATION_DATA {
24939    #[doc = "Aileron setpoints: left, center, right"]
24940    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24941    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24942    pub aileron: [u16; 3],
24943    #[doc = "Elevator setpoints: nose down, center, nose up"]
24944    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24945    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24946    pub elevator: [u16; 3],
24947    #[doc = "Rudder setpoints: nose left, center, nose right"]
24948    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24949    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24950    pub rudder: [u16; 3],
24951    #[doc = "Tail gyro mode/gain setpoints: heading hold, rate mode"]
24952    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24953    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24954    pub gyro: [u16; 2],
24955    #[doc = "Pitch curve setpoints (every 25%)"]
24956    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24957    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24958    pub pitch: [u16; 5],
24959    #[doc = "Throttle curve setpoints (every 25%)"]
24960    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24961    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24962    pub throttle: [u16; 5],
24963}
24964impl RADIO_CALIBRATION_DATA {
24965    pub const ENCODED_LEN: usize = 42usize;
24966    pub const DEFAULT: Self = Self {
24967        aileron: [0_u16; 3usize],
24968        elevator: [0_u16; 3usize],
24969        rudder: [0_u16; 3usize],
24970        gyro: [0_u16; 2usize],
24971        pitch: [0_u16; 5usize],
24972        throttle: [0_u16; 5usize],
24973    };
24974    #[cfg(feature = "arbitrary")]
24975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24976        use arbitrary::{Arbitrary, Unstructured};
24977        let mut buf = [0u8; 1024];
24978        rng.fill_bytes(&mut buf);
24979        let mut unstructured = Unstructured::new(&buf);
24980        Self::arbitrary(&mut unstructured).unwrap_or_default()
24981    }
24982}
24983impl Default for RADIO_CALIBRATION_DATA {
24984    fn default() -> Self {
24985        Self::DEFAULT.clone()
24986    }
24987}
24988impl MessageData for RADIO_CALIBRATION_DATA {
24989    type Message = MavMessage;
24990    const ID: u32 = 221u32;
24991    const NAME: &'static str = "RADIO_CALIBRATION";
24992    const EXTRA_CRC: u8 = 71u8;
24993    const ENCODED_LEN: usize = 42usize;
24994    fn deser(
24995        _version: MavlinkVersion,
24996        __input: &[u8],
24997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24998        let avail_len = __input.len();
24999        let mut payload_buf = [0; Self::ENCODED_LEN];
25000        let mut buf = if avail_len < Self::ENCODED_LEN {
25001            payload_buf[0..avail_len].copy_from_slice(__input);
25002            Bytes::new(&payload_buf)
25003        } else {
25004            Bytes::new(__input)
25005        };
25006        let mut __struct = Self::default();
25007        for v in &mut __struct.aileron {
25008            let val = buf.get_u16_le()?;
25009            *v = val;
25010        }
25011        for v in &mut __struct.elevator {
25012            let val = buf.get_u16_le()?;
25013            *v = val;
25014        }
25015        for v in &mut __struct.rudder {
25016            let val = buf.get_u16_le()?;
25017            *v = val;
25018        }
25019        for v in &mut __struct.gyro {
25020            let val = buf.get_u16_le()?;
25021            *v = val;
25022        }
25023        for v in &mut __struct.pitch {
25024            let val = buf.get_u16_le()?;
25025            *v = val;
25026        }
25027        for v in &mut __struct.throttle {
25028            let val = buf.get_u16_le()?;
25029            *v = val;
25030        }
25031        Ok(__struct)
25032    }
25033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25034        let mut __tmp = BytesMut::new(bytes);
25035        #[allow(clippy::absurd_extreme_comparisons)]
25036        #[allow(unused_comparisons)]
25037        if __tmp.remaining() < Self::ENCODED_LEN {
25038            panic!(
25039                "buffer is too small (need {} bytes, but got {})",
25040                Self::ENCODED_LEN,
25041                __tmp.remaining(),
25042            )
25043        }
25044        for val in &self.aileron {
25045            __tmp.put_u16_le(*val);
25046        }
25047        for val in &self.elevator {
25048            __tmp.put_u16_le(*val);
25049        }
25050        for val in &self.rudder {
25051            __tmp.put_u16_le(*val);
25052        }
25053        for val in &self.gyro {
25054            __tmp.put_u16_le(*val);
25055        }
25056        for val in &self.pitch {
25057            __tmp.put_u16_le(*val);
25058        }
25059        for val in &self.throttle {
25060            __tmp.put_u16_le(*val);
25061        }
25062        if matches!(version, MavlinkVersion::V2) {
25063            let len = __tmp.len();
25064            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25065        } else {
25066            __tmp.len()
25067        }
25068    }
25069}
25070#[doc = "Status generated by radio and injected into MAVLink stream."]
25071#[doc = ""]
25072#[doc = "ID: 109"]
25073#[derive(Debug, Clone, PartialEq)]
25074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25076#[cfg_attr(feature = "ts", derive(TS))]
25077#[cfg_attr(feature = "ts", ts(export))]
25078pub struct RADIO_STATUS_DATA {
25079    #[doc = "Count of radio packet receive errors (since boot)."]
25080    pub rxerrors: u16,
25081    #[doc = "Count of error corrected radio packets (since boot)."]
25082    pub fixed: u16,
25083    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25084    pub rssi: u8,
25085    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25086    pub remrssi: u8,
25087    #[doc = "Remaining free transmitter buffer space."]
25088    pub txbuf: u8,
25089    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25090    pub noise: u8,
25091    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25092    pub remnoise: u8,
25093}
25094impl RADIO_STATUS_DATA {
25095    pub const ENCODED_LEN: usize = 9usize;
25096    pub const DEFAULT: Self = Self {
25097        rxerrors: 0_u16,
25098        fixed: 0_u16,
25099        rssi: 0_u8,
25100        remrssi: 0_u8,
25101        txbuf: 0_u8,
25102        noise: 0_u8,
25103        remnoise: 0_u8,
25104    };
25105    #[cfg(feature = "arbitrary")]
25106    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25107        use arbitrary::{Arbitrary, Unstructured};
25108        let mut buf = [0u8; 1024];
25109        rng.fill_bytes(&mut buf);
25110        let mut unstructured = Unstructured::new(&buf);
25111        Self::arbitrary(&mut unstructured).unwrap_or_default()
25112    }
25113}
25114impl Default for RADIO_STATUS_DATA {
25115    fn default() -> Self {
25116        Self::DEFAULT.clone()
25117    }
25118}
25119impl MessageData for RADIO_STATUS_DATA {
25120    type Message = MavMessage;
25121    const ID: u32 = 109u32;
25122    const NAME: &'static str = "RADIO_STATUS";
25123    const EXTRA_CRC: u8 = 185u8;
25124    const ENCODED_LEN: usize = 9usize;
25125    fn deser(
25126        _version: MavlinkVersion,
25127        __input: &[u8],
25128    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25129        let avail_len = __input.len();
25130        let mut payload_buf = [0; Self::ENCODED_LEN];
25131        let mut buf = if avail_len < Self::ENCODED_LEN {
25132            payload_buf[0..avail_len].copy_from_slice(__input);
25133            Bytes::new(&payload_buf)
25134        } else {
25135            Bytes::new(__input)
25136        };
25137        let mut __struct = Self::default();
25138        __struct.rxerrors = buf.get_u16_le()?;
25139        __struct.fixed = buf.get_u16_le()?;
25140        __struct.rssi = buf.get_u8()?;
25141        __struct.remrssi = buf.get_u8()?;
25142        __struct.txbuf = buf.get_u8()?;
25143        __struct.noise = buf.get_u8()?;
25144        __struct.remnoise = buf.get_u8()?;
25145        Ok(__struct)
25146    }
25147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25148        let mut __tmp = BytesMut::new(bytes);
25149        #[allow(clippy::absurd_extreme_comparisons)]
25150        #[allow(unused_comparisons)]
25151        if __tmp.remaining() < Self::ENCODED_LEN {
25152            panic!(
25153                "buffer is too small (need {} bytes, but got {})",
25154                Self::ENCODED_LEN,
25155                __tmp.remaining(),
25156            )
25157        }
25158        __tmp.put_u16_le(self.rxerrors);
25159        __tmp.put_u16_le(self.fixed);
25160        __tmp.put_u8(self.rssi);
25161        __tmp.put_u8(self.remrssi);
25162        __tmp.put_u8(self.txbuf);
25163        __tmp.put_u8(self.noise);
25164        __tmp.put_u8(self.remnoise);
25165        if matches!(version, MavlinkVersion::V2) {
25166            let len = __tmp.len();
25167            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25168        } else {
25169            __tmp.len()
25170        }
25171    }
25172}
25173#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25174#[doc = ""]
25175#[doc = "ID: 27"]
25176#[derive(Debug, Clone, PartialEq)]
25177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25179#[cfg_attr(feature = "ts", derive(TS))]
25180#[cfg_attr(feature = "ts", ts(export))]
25181pub struct RAW_IMU_DATA {
25182    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25183    pub time_usec: u64,
25184    #[doc = "X acceleration (raw)"]
25185    pub xacc: i16,
25186    #[doc = "Y acceleration (raw)"]
25187    pub yacc: i16,
25188    #[doc = "Z acceleration (raw)"]
25189    pub zacc: i16,
25190    #[doc = "Angular speed around X axis (raw)"]
25191    pub xgyro: i16,
25192    #[doc = "Angular speed around Y axis (raw)"]
25193    pub ygyro: i16,
25194    #[doc = "Angular speed around Z axis (raw)"]
25195    pub zgyro: i16,
25196    #[doc = "X Magnetic field (raw)"]
25197    pub xmag: i16,
25198    #[doc = "Y Magnetic field (raw)"]
25199    pub ymag: i16,
25200    #[doc = "Z Magnetic field (raw)"]
25201    pub zmag: i16,
25202    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25203    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25204    pub id: u8,
25205    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25206    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25207    pub temperature: i16,
25208}
25209impl RAW_IMU_DATA {
25210    pub const ENCODED_LEN: usize = 29usize;
25211    pub const DEFAULT: Self = Self {
25212        time_usec: 0_u64,
25213        xacc: 0_i16,
25214        yacc: 0_i16,
25215        zacc: 0_i16,
25216        xgyro: 0_i16,
25217        ygyro: 0_i16,
25218        zgyro: 0_i16,
25219        xmag: 0_i16,
25220        ymag: 0_i16,
25221        zmag: 0_i16,
25222        id: 0_u8,
25223        temperature: 0_i16,
25224    };
25225    #[cfg(feature = "arbitrary")]
25226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25227        use arbitrary::{Arbitrary, Unstructured};
25228        let mut buf = [0u8; 1024];
25229        rng.fill_bytes(&mut buf);
25230        let mut unstructured = Unstructured::new(&buf);
25231        Self::arbitrary(&mut unstructured).unwrap_or_default()
25232    }
25233}
25234impl Default for RAW_IMU_DATA {
25235    fn default() -> Self {
25236        Self::DEFAULT.clone()
25237    }
25238}
25239impl MessageData for RAW_IMU_DATA {
25240    type Message = MavMessage;
25241    const ID: u32 = 27u32;
25242    const NAME: &'static str = "RAW_IMU";
25243    const EXTRA_CRC: u8 = 144u8;
25244    const ENCODED_LEN: usize = 29usize;
25245    fn deser(
25246        _version: MavlinkVersion,
25247        __input: &[u8],
25248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25249        let avail_len = __input.len();
25250        let mut payload_buf = [0; Self::ENCODED_LEN];
25251        let mut buf = if avail_len < Self::ENCODED_LEN {
25252            payload_buf[0..avail_len].copy_from_slice(__input);
25253            Bytes::new(&payload_buf)
25254        } else {
25255            Bytes::new(__input)
25256        };
25257        let mut __struct = Self::default();
25258        __struct.time_usec = buf.get_u64_le()?;
25259        __struct.xacc = buf.get_i16_le()?;
25260        __struct.yacc = buf.get_i16_le()?;
25261        __struct.zacc = buf.get_i16_le()?;
25262        __struct.xgyro = buf.get_i16_le()?;
25263        __struct.ygyro = buf.get_i16_le()?;
25264        __struct.zgyro = buf.get_i16_le()?;
25265        __struct.xmag = buf.get_i16_le()?;
25266        __struct.ymag = buf.get_i16_le()?;
25267        __struct.zmag = buf.get_i16_le()?;
25268        __struct.id = buf.get_u8()?;
25269        __struct.temperature = buf.get_i16_le()?;
25270        Ok(__struct)
25271    }
25272    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25273        let mut __tmp = BytesMut::new(bytes);
25274        #[allow(clippy::absurd_extreme_comparisons)]
25275        #[allow(unused_comparisons)]
25276        if __tmp.remaining() < Self::ENCODED_LEN {
25277            panic!(
25278                "buffer is too small (need {} bytes, but got {})",
25279                Self::ENCODED_LEN,
25280                __tmp.remaining(),
25281            )
25282        }
25283        __tmp.put_u64_le(self.time_usec);
25284        __tmp.put_i16_le(self.xacc);
25285        __tmp.put_i16_le(self.yacc);
25286        __tmp.put_i16_le(self.zacc);
25287        __tmp.put_i16_le(self.xgyro);
25288        __tmp.put_i16_le(self.ygyro);
25289        __tmp.put_i16_le(self.zgyro);
25290        __tmp.put_i16_le(self.xmag);
25291        __tmp.put_i16_le(self.ymag);
25292        __tmp.put_i16_le(self.zmag);
25293        if matches!(version, MavlinkVersion::V2) {
25294            __tmp.put_u8(self.id);
25295            __tmp.put_i16_le(self.temperature);
25296            let len = __tmp.len();
25297            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25298        } else {
25299            __tmp.len()
25300        }
25301    }
25302}
25303#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25304#[doc = ""]
25305#[doc = "ID: 28"]
25306#[derive(Debug, Clone, PartialEq)]
25307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25308#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25309#[cfg_attr(feature = "ts", derive(TS))]
25310#[cfg_attr(feature = "ts", ts(export))]
25311pub struct RAW_PRESSURE_DATA {
25312    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25313    pub time_usec: u64,
25314    #[doc = "Absolute pressure (raw)"]
25315    pub press_abs: i16,
25316    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25317    pub press_diff1: i16,
25318    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25319    pub press_diff2: i16,
25320    #[doc = "Raw Temperature measurement (raw)"]
25321    pub temperature: i16,
25322}
25323impl RAW_PRESSURE_DATA {
25324    pub const ENCODED_LEN: usize = 16usize;
25325    pub const DEFAULT: Self = Self {
25326        time_usec: 0_u64,
25327        press_abs: 0_i16,
25328        press_diff1: 0_i16,
25329        press_diff2: 0_i16,
25330        temperature: 0_i16,
25331    };
25332    #[cfg(feature = "arbitrary")]
25333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25334        use arbitrary::{Arbitrary, Unstructured};
25335        let mut buf = [0u8; 1024];
25336        rng.fill_bytes(&mut buf);
25337        let mut unstructured = Unstructured::new(&buf);
25338        Self::arbitrary(&mut unstructured).unwrap_or_default()
25339    }
25340}
25341impl Default for RAW_PRESSURE_DATA {
25342    fn default() -> Self {
25343        Self::DEFAULT.clone()
25344    }
25345}
25346impl MessageData for RAW_PRESSURE_DATA {
25347    type Message = MavMessage;
25348    const ID: u32 = 28u32;
25349    const NAME: &'static str = "RAW_PRESSURE";
25350    const EXTRA_CRC: u8 = 67u8;
25351    const ENCODED_LEN: usize = 16usize;
25352    fn deser(
25353        _version: MavlinkVersion,
25354        __input: &[u8],
25355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25356        let avail_len = __input.len();
25357        let mut payload_buf = [0; Self::ENCODED_LEN];
25358        let mut buf = if avail_len < Self::ENCODED_LEN {
25359            payload_buf[0..avail_len].copy_from_slice(__input);
25360            Bytes::new(&payload_buf)
25361        } else {
25362            Bytes::new(__input)
25363        };
25364        let mut __struct = Self::default();
25365        __struct.time_usec = buf.get_u64_le()?;
25366        __struct.press_abs = buf.get_i16_le()?;
25367        __struct.press_diff1 = buf.get_i16_le()?;
25368        __struct.press_diff2 = buf.get_i16_le()?;
25369        __struct.temperature = buf.get_i16_le()?;
25370        Ok(__struct)
25371    }
25372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25373        let mut __tmp = BytesMut::new(bytes);
25374        #[allow(clippy::absurd_extreme_comparisons)]
25375        #[allow(unused_comparisons)]
25376        if __tmp.remaining() < Self::ENCODED_LEN {
25377            panic!(
25378                "buffer is too small (need {} bytes, but got {})",
25379                Self::ENCODED_LEN,
25380                __tmp.remaining(),
25381            )
25382        }
25383        __tmp.put_u64_le(self.time_usec);
25384        __tmp.put_i16_le(self.press_abs);
25385        __tmp.put_i16_le(self.press_diff1);
25386        __tmp.put_i16_le(self.press_diff2);
25387        __tmp.put_i16_le(self.temperature);
25388        if matches!(version, MavlinkVersion::V2) {
25389            let len = __tmp.len();
25390            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25391        } else {
25392            __tmp.len()
25393        }
25394    }
25395}
25396#[doc = "RPM sensor data message."]
25397#[doc = ""]
25398#[doc = "ID: 339"]
25399#[derive(Debug, Clone, PartialEq)]
25400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25402#[cfg_attr(feature = "ts", derive(TS))]
25403#[cfg_attr(feature = "ts", ts(export))]
25404pub struct RAW_RPM_DATA {
25405    #[doc = "Indicated rate"]
25406    pub frequency: f32,
25407    #[doc = "Index of this RPM sensor (0-indexed)"]
25408    pub index: u8,
25409}
25410impl RAW_RPM_DATA {
25411    pub const ENCODED_LEN: usize = 5usize;
25412    pub const DEFAULT: Self = Self {
25413        frequency: 0.0_f32,
25414        index: 0_u8,
25415    };
25416    #[cfg(feature = "arbitrary")]
25417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25418        use arbitrary::{Arbitrary, Unstructured};
25419        let mut buf = [0u8; 1024];
25420        rng.fill_bytes(&mut buf);
25421        let mut unstructured = Unstructured::new(&buf);
25422        Self::arbitrary(&mut unstructured).unwrap_or_default()
25423    }
25424}
25425impl Default for RAW_RPM_DATA {
25426    fn default() -> Self {
25427        Self::DEFAULT.clone()
25428    }
25429}
25430impl MessageData for RAW_RPM_DATA {
25431    type Message = MavMessage;
25432    const ID: u32 = 339u32;
25433    const NAME: &'static str = "RAW_RPM";
25434    const EXTRA_CRC: u8 = 199u8;
25435    const ENCODED_LEN: usize = 5usize;
25436    fn deser(
25437        _version: MavlinkVersion,
25438        __input: &[u8],
25439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25440        let avail_len = __input.len();
25441        let mut payload_buf = [0; Self::ENCODED_LEN];
25442        let mut buf = if avail_len < Self::ENCODED_LEN {
25443            payload_buf[0..avail_len].copy_from_slice(__input);
25444            Bytes::new(&payload_buf)
25445        } else {
25446            Bytes::new(__input)
25447        };
25448        let mut __struct = Self::default();
25449        __struct.frequency = buf.get_f32_le()?;
25450        __struct.index = buf.get_u8()?;
25451        Ok(__struct)
25452    }
25453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25454        let mut __tmp = BytesMut::new(bytes);
25455        #[allow(clippy::absurd_extreme_comparisons)]
25456        #[allow(unused_comparisons)]
25457        if __tmp.remaining() < Self::ENCODED_LEN {
25458            panic!(
25459                "buffer is too small (need {} bytes, but got {})",
25460                Self::ENCODED_LEN,
25461                __tmp.remaining(),
25462            )
25463        }
25464        __tmp.put_f32_le(self.frequency);
25465        __tmp.put_u8(self.index);
25466        if matches!(version, MavlinkVersion::V2) {
25467            let len = __tmp.len();
25468            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25469        } else {
25470            __tmp.len()
25471        }
25472    }
25473}
25474#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25475#[doc = ""]
25476#[doc = "ID: 65"]
25477#[derive(Debug, Clone, PartialEq)]
25478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25479#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25480#[cfg_attr(feature = "ts", derive(TS))]
25481#[cfg_attr(feature = "ts", ts(export))]
25482pub struct RC_CHANNELS_DATA {
25483    #[doc = "Timestamp (time since system boot)."]
25484    pub time_boot_ms: u32,
25485    #[doc = "RC channel 1 value."]
25486    pub chan1_raw: u16,
25487    #[doc = "RC channel 2 value."]
25488    pub chan2_raw: u16,
25489    #[doc = "RC channel 3 value."]
25490    pub chan3_raw: u16,
25491    #[doc = "RC channel 4 value."]
25492    pub chan4_raw: u16,
25493    #[doc = "RC channel 5 value."]
25494    pub chan5_raw: u16,
25495    #[doc = "RC channel 6 value."]
25496    pub chan6_raw: u16,
25497    #[doc = "RC channel 7 value."]
25498    pub chan7_raw: u16,
25499    #[doc = "RC channel 8 value."]
25500    pub chan8_raw: u16,
25501    #[doc = "RC channel 9 value."]
25502    pub chan9_raw: u16,
25503    #[doc = "RC channel 10 value."]
25504    pub chan10_raw: u16,
25505    #[doc = "RC channel 11 value."]
25506    pub chan11_raw: u16,
25507    #[doc = "RC channel 12 value."]
25508    pub chan12_raw: u16,
25509    #[doc = "RC channel 13 value."]
25510    pub chan13_raw: u16,
25511    #[doc = "RC channel 14 value."]
25512    pub chan14_raw: u16,
25513    #[doc = "RC channel 15 value."]
25514    pub chan15_raw: u16,
25515    #[doc = "RC channel 16 value."]
25516    pub chan16_raw: u16,
25517    #[doc = "RC channel 17 value."]
25518    pub chan17_raw: u16,
25519    #[doc = "RC channel 18 value."]
25520    pub chan18_raw: u16,
25521    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25522    pub chancount: u8,
25523    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25524    pub rssi: u8,
25525}
25526impl RC_CHANNELS_DATA {
25527    pub const ENCODED_LEN: usize = 42usize;
25528    pub const DEFAULT: Self = Self {
25529        time_boot_ms: 0_u32,
25530        chan1_raw: 0_u16,
25531        chan2_raw: 0_u16,
25532        chan3_raw: 0_u16,
25533        chan4_raw: 0_u16,
25534        chan5_raw: 0_u16,
25535        chan6_raw: 0_u16,
25536        chan7_raw: 0_u16,
25537        chan8_raw: 0_u16,
25538        chan9_raw: 0_u16,
25539        chan10_raw: 0_u16,
25540        chan11_raw: 0_u16,
25541        chan12_raw: 0_u16,
25542        chan13_raw: 0_u16,
25543        chan14_raw: 0_u16,
25544        chan15_raw: 0_u16,
25545        chan16_raw: 0_u16,
25546        chan17_raw: 0_u16,
25547        chan18_raw: 0_u16,
25548        chancount: 0_u8,
25549        rssi: 0_u8,
25550    };
25551    #[cfg(feature = "arbitrary")]
25552    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25553        use arbitrary::{Arbitrary, Unstructured};
25554        let mut buf = [0u8; 1024];
25555        rng.fill_bytes(&mut buf);
25556        let mut unstructured = Unstructured::new(&buf);
25557        Self::arbitrary(&mut unstructured).unwrap_or_default()
25558    }
25559}
25560impl Default for RC_CHANNELS_DATA {
25561    fn default() -> Self {
25562        Self::DEFAULT.clone()
25563    }
25564}
25565impl MessageData for RC_CHANNELS_DATA {
25566    type Message = MavMessage;
25567    const ID: u32 = 65u32;
25568    const NAME: &'static str = "RC_CHANNELS";
25569    const EXTRA_CRC: u8 = 118u8;
25570    const ENCODED_LEN: usize = 42usize;
25571    fn deser(
25572        _version: MavlinkVersion,
25573        __input: &[u8],
25574    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25575        let avail_len = __input.len();
25576        let mut payload_buf = [0; Self::ENCODED_LEN];
25577        let mut buf = if avail_len < Self::ENCODED_LEN {
25578            payload_buf[0..avail_len].copy_from_slice(__input);
25579            Bytes::new(&payload_buf)
25580        } else {
25581            Bytes::new(__input)
25582        };
25583        let mut __struct = Self::default();
25584        __struct.time_boot_ms = buf.get_u32_le()?;
25585        __struct.chan1_raw = buf.get_u16_le()?;
25586        __struct.chan2_raw = buf.get_u16_le()?;
25587        __struct.chan3_raw = buf.get_u16_le()?;
25588        __struct.chan4_raw = buf.get_u16_le()?;
25589        __struct.chan5_raw = buf.get_u16_le()?;
25590        __struct.chan6_raw = buf.get_u16_le()?;
25591        __struct.chan7_raw = buf.get_u16_le()?;
25592        __struct.chan8_raw = buf.get_u16_le()?;
25593        __struct.chan9_raw = buf.get_u16_le()?;
25594        __struct.chan10_raw = buf.get_u16_le()?;
25595        __struct.chan11_raw = buf.get_u16_le()?;
25596        __struct.chan12_raw = buf.get_u16_le()?;
25597        __struct.chan13_raw = buf.get_u16_le()?;
25598        __struct.chan14_raw = buf.get_u16_le()?;
25599        __struct.chan15_raw = buf.get_u16_le()?;
25600        __struct.chan16_raw = buf.get_u16_le()?;
25601        __struct.chan17_raw = buf.get_u16_le()?;
25602        __struct.chan18_raw = buf.get_u16_le()?;
25603        __struct.chancount = buf.get_u8()?;
25604        __struct.rssi = buf.get_u8()?;
25605        Ok(__struct)
25606    }
25607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25608        let mut __tmp = BytesMut::new(bytes);
25609        #[allow(clippy::absurd_extreme_comparisons)]
25610        #[allow(unused_comparisons)]
25611        if __tmp.remaining() < Self::ENCODED_LEN {
25612            panic!(
25613                "buffer is too small (need {} bytes, but got {})",
25614                Self::ENCODED_LEN,
25615                __tmp.remaining(),
25616            )
25617        }
25618        __tmp.put_u32_le(self.time_boot_ms);
25619        __tmp.put_u16_le(self.chan1_raw);
25620        __tmp.put_u16_le(self.chan2_raw);
25621        __tmp.put_u16_le(self.chan3_raw);
25622        __tmp.put_u16_le(self.chan4_raw);
25623        __tmp.put_u16_le(self.chan5_raw);
25624        __tmp.put_u16_le(self.chan6_raw);
25625        __tmp.put_u16_le(self.chan7_raw);
25626        __tmp.put_u16_le(self.chan8_raw);
25627        __tmp.put_u16_le(self.chan9_raw);
25628        __tmp.put_u16_le(self.chan10_raw);
25629        __tmp.put_u16_le(self.chan11_raw);
25630        __tmp.put_u16_le(self.chan12_raw);
25631        __tmp.put_u16_le(self.chan13_raw);
25632        __tmp.put_u16_le(self.chan14_raw);
25633        __tmp.put_u16_le(self.chan15_raw);
25634        __tmp.put_u16_le(self.chan16_raw);
25635        __tmp.put_u16_le(self.chan17_raw);
25636        __tmp.put_u16_le(self.chan18_raw);
25637        __tmp.put_u8(self.chancount);
25638        __tmp.put_u8(self.rssi);
25639        if matches!(version, MavlinkVersion::V2) {
25640            let len = __tmp.len();
25641            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25642        } else {
25643            __tmp.len()
25644        }
25645    }
25646}
25647#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25648#[doc = ""]
25649#[doc = "ID: 70"]
25650#[derive(Debug, Clone, PartialEq)]
25651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25652#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25653#[cfg_attr(feature = "ts", derive(TS))]
25654#[cfg_attr(feature = "ts", ts(export))]
25655pub struct RC_CHANNELS_OVERRIDE_DATA {
25656    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25657    pub chan1_raw: u16,
25658    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25659    pub chan2_raw: u16,
25660    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25661    pub chan3_raw: u16,
25662    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25663    pub chan4_raw: u16,
25664    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25665    pub chan5_raw: u16,
25666    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25667    pub chan6_raw: u16,
25668    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25669    pub chan7_raw: u16,
25670    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25671    pub chan8_raw: u16,
25672    #[doc = "System ID"]
25673    pub target_system: u8,
25674    #[doc = "Component ID"]
25675    pub target_component: u8,
25676    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25677    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25678    pub chan9_raw: u16,
25679    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25680    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25681    pub chan10_raw: u16,
25682    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25683    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25684    pub chan11_raw: u16,
25685    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25686    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25687    pub chan12_raw: u16,
25688    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25689    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25690    pub chan13_raw: u16,
25691    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25692    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25693    pub chan14_raw: u16,
25694    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25696    pub chan15_raw: u16,
25697    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25698    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25699    pub chan16_raw: u16,
25700    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25701    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25702    pub chan17_raw: u16,
25703    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25704    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25705    pub chan18_raw: u16,
25706}
25707impl RC_CHANNELS_OVERRIDE_DATA {
25708    pub const ENCODED_LEN: usize = 38usize;
25709    pub const DEFAULT: Self = Self {
25710        chan1_raw: 0_u16,
25711        chan2_raw: 0_u16,
25712        chan3_raw: 0_u16,
25713        chan4_raw: 0_u16,
25714        chan5_raw: 0_u16,
25715        chan6_raw: 0_u16,
25716        chan7_raw: 0_u16,
25717        chan8_raw: 0_u16,
25718        target_system: 0_u8,
25719        target_component: 0_u8,
25720        chan9_raw: 0_u16,
25721        chan10_raw: 0_u16,
25722        chan11_raw: 0_u16,
25723        chan12_raw: 0_u16,
25724        chan13_raw: 0_u16,
25725        chan14_raw: 0_u16,
25726        chan15_raw: 0_u16,
25727        chan16_raw: 0_u16,
25728        chan17_raw: 0_u16,
25729        chan18_raw: 0_u16,
25730    };
25731    #[cfg(feature = "arbitrary")]
25732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25733        use arbitrary::{Arbitrary, Unstructured};
25734        let mut buf = [0u8; 1024];
25735        rng.fill_bytes(&mut buf);
25736        let mut unstructured = Unstructured::new(&buf);
25737        Self::arbitrary(&mut unstructured).unwrap_or_default()
25738    }
25739}
25740impl Default for RC_CHANNELS_OVERRIDE_DATA {
25741    fn default() -> Self {
25742        Self::DEFAULT.clone()
25743    }
25744}
25745impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25746    type Message = MavMessage;
25747    const ID: u32 = 70u32;
25748    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25749    const EXTRA_CRC: u8 = 124u8;
25750    const ENCODED_LEN: usize = 38usize;
25751    fn deser(
25752        _version: MavlinkVersion,
25753        __input: &[u8],
25754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25755        let avail_len = __input.len();
25756        let mut payload_buf = [0; Self::ENCODED_LEN];
25757        let mut buf = if avail_len < Self::ENCODED_LEN {
25758            payload_buf[0..avail_len].copy_from_slice(__input);
25759            Bytes::new(&payload_buf)
25760        } else {
25761            Bytes::new(__input)
25762        };
25763        let mut __struct = Self::default();
25764        __struct.chan1_raw = buf.get_u16_le()?;
25765        __struct.chan2_raw = buf.get_u16_le()?;
25766        __struct.chan3_raw = buf.get_u16_le()?;
25767        __struct.chan4_raw = buf.get_u16_le()?;
25768        __struct.chan5_raw = buf.get_u16_le()?;
25769        __struct.chan6_raw = buf.get_u16_le()?;
25770        __struct.chan7_raw = buf.get_u16_le()?;
25771        __struct.chan8_raw = buf.get_u16_le()?;
25772        __struct.target_system = buf.get_u8()?;
25773        __struct.target_component = buf.get_u8()?;
25774        __struct.chan9_raw = buf.get_u16_le()?;
25775        __struct.chan10_raw = buf.get_u16_le()?;
25776        __struct.chan11_raw = buf.get_u16_le()?;
25777        __struct.chan12_raw = buf.get_u16_le()?;
25778        __struct.chan13_raw = buf.get_u16_le()?;
25779        __struct.chan14_raw = buf.get_u16_le()?;
25780        __struct.chan15_raw = buf.get_u16_le()?;
25781        __struct.chan16_raw = buf.get_u16_le()?;
25782        __struct.chan17_raw = buf.get_u16_le()?;
25783        __struct.chan18_raw = buf.get_u16_le()?;
25784        Ok(__struct)
25785    }
25786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25787        let mut __tmp = BytesMut::new(bytes);
25788        #[allow(clippy::absurd_extreme_comparisons)]
25789        #[allow(unused_comparisons)]
25790        if __tmp.remaining() < Self::ENCODED_LEN {
25791            panic!(
25792                "buffer is too small (need {} bytes, but got {})",
25793                Self::ENCODED_LEN,
25794                __tmp.remaining(),
25795            )
25796        }
25797        __tmp.put_u16_le(self.chan1_raw);
25798        __tmp.put_u16_le(self.chan2_raw);
25799        __tmp.put_u16_le(self.chan3_raw);
25800        __tmp.put_u16_le(self.chan4_raw);
25801        __tmp.put_u16_le(self.chan5_raw);
25802        __tmp.put_u16_le(self.chan6_raw);
25803        __tmp.put_u16_le(self.chan7_raw);
25804        __tmp.put_u16_le(self.chan8_raw);
25805        __tmp.put_u8(self.target_system);
25806        __tmp.put_u8(self.target_component);
25807        if matches!(version, MavlinkVersion::V2) {
25808            __tmp.put_u16_le(self.chan9_raw);
25809            __tmp.put_u16_le(self.chan10_raw);
25810            __tmp.put_u16_le(self.chan11_raw);
25811            __tmp.put_u16_le(self.chan12_raw);
25812            __tmp.put_u16_le(self.chan13_raw);
25813            __tmp.put_u16_le(self.chan14_raw);
25814            __tmp.put_u16_le(self.chan15_raw);
25815            __tmp.put_u16_le(self.chan16_raw);
25816            __tmp.put_u16_le(self.chan17_raw);
25817            __tmp.put_u16_le(self.chan18_raw);
25818            let len = __tmp.len();
25819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25820        } else {
25821            __tmp.len()
25822        }
25823    }
25824}
25825#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25826#[doc = ""]
25827#[doc = "ID: 35"]
25828#[derive(Debug, Clone, PartialEq)]
25829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25831#[cfg_attr(feature = "ts", derive(TS))]
25832#[cfg_attr(feature = "ts", ts(export))]
25833pub struct RC_CHANNELS_RAW_DATA {
25834    #[doc = "Timestamp (time since system boot)."]
25835    pub time_boot_ms: u32,
25836    #[doc = "RC channel 1 value."]
25837    pub chan1_raw: u16,
25838    #[doc = "RC channel 2 value."]
25839    pub chan2_raw: u16,
25840    #[doc = "RC channel 3 value."]
25841    pub chan3_raw: u16,
25842    #[doc = "RC channel 4 value."]
25843    pub chan4_raw: u16,
25844    #[doc = "RC channel 5 value."]
25845    pub chan5_raw: u16,
25846    #[doc = "RC channel 6 value."]
25847    pub chan6_raw: u16,
25848    #[doc = "RC channel 7 value."]
25849    pub chan7_raw: u16,
25850    #[doc = "RC channel 8 value."]
25851    pub chan8_raw: u16,
25852    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25853    pub port: u8,
25854    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25855    pub rssi: u8,
25856}
25857impl RC_CHANNELS_RAW_DATA {
25858    pub const ENCODED_LEN: usize = 22usize;
25859    pub const DEFAULT: Self = Self {
25860        time_boot_ms: 0_u32,
25861        chan1_raw: 0_u16,
25862        chan2_raw: 0_u16,
25863        chan3_raw: 0_u16,
25864        chan4_raw: 0_u16,
25865        chan5_raw: 0_u16,
25866        chan6_raw: 0_u16,
25867        chan7_raw: 0_u16,
25868        chan8_raw: 0_u16,
25869        port: 0_u8,
25870        rssi: 0_u8,
25871    };
25872    #[cfg(feature = "arbitrary")]
25873    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25874        use arbitrary::{Arbitrary, Unstructured};
25875        let mut buf = [0u8; 1024];
25876        rng.fill_bytes(&mut buf);
25877        let mut unstructured = Unstructured::new(&buf);
25878        Self::arbitrary(&mut unstructured).unwrap_or_default()
25879    }
25880}
25881impl Default for RC_CHANNELS_RAW_DATA {
25882    fn default() -> Self {
25883        Self::DEFAULT.clone()
25884    }
25885}
25886impl MessageData for RC_CHANNELS_RAW_DATA {
25887    type Message = MavMessage;
25888    const ID: u32 = 35u32;
25889    const NAME: &'static str = "RC_CHANNELS_RAW";
25890    const EXTRA_CRC: u8 = 244u8;
25891    const ENCODED_LEN: usize = 22usize;
25892    fn deser(
25893        _version: MavlinkVersion,
25894        __input: &[u8],
25895    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25896        let avail_len = __input.len();
25897        let mut payload_buf = [0; Self::ENCODED_LEN];
25898        let mut buf = if avail_len < Self::ENCODED_LEN {
25899            payload_buf[0..avail_len].copy_from_slice(__input);
25900            Bytes::new(&payload_buf)
25901        } else {
25902            Bytes::new(__input)
25903        };
25904        let mut __struct = Self::default();
25905        __struct.time_boot_ms = buf.get_u32_le()?;
25906        __struct.chan1_raw = buf.get_u16_le()?;
25907        __struct.chan2_raw = buf.get_u16_le()?;
25908        __struct.chan3_raw = buf.get_u16_le()?;
25909        __struct.chan4_raw = buf.get_u16_le()?;
25910        __struct.chan5_raw = buf.get_u16_le()?;
25911        __struct.chan6_raw = buf.get_u16_le()?;
25912        __struct.chan7_raw = buf.get_u16_le()?;
25913        __struct.chan8_raw = buf.get_u16_le()?;
25914        __struct.port = buf.get_u8()?;
25915        __struct.rssi = buf.get_u8()?;
25916        Ok(__struct)
25917    }
25918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25919        let mut __tmp = BytesMut::new(bytes);
25920        #[allow(clippy::absurd_extreme_comparisons)]
25921        #[allow(unused_comparisons)]
25922        if __tmp.remaining() < Self::ENCODED_LEN {
25923            panic!(
25924                "buffer is too small (need {} bytes, but got {})",
25925                Self::ENCODED_LEN,
25926                __tmp.remaining(),
25927            )
25928        }
25929        __tmp.put_u32_le(self.time_boot_ms);
25930        __tmp.put_u16_le(self.chan1_raw);
25931        __tmp.put_u16_le(self.chan2_raw);
25932        __tmp.put_u16_le(self.chan3_raw);
25933        __tmp.put_u16_le(self.chan4_raw);
25934        __tmp.put_u16_le(self.chan5_raw);
25935        __tmp.put_u16_le(self.chan6_raw);
25936        __tmp.put_u16_le(self.chan7_raw);
25937        __tmp.put_u16_le(self.chan8_raw);
25938        __tmp.put_u8(self.port);
25939        __tmp.put_u8(self.rssi);
25940        if matches!(version, MavlinkVersion::V2) {
25941            let len = __tmp.len();
25942            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25943        } else {
25944            __tmp.len()
25945        }
25946    }
25947}
25948#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25949#[doc = ""]
25950#[doc = "ID: 34"]
25951#[derive(Debug, Clone, PartialEq)]
25952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25954#[cfg_attr(feature = "ts", derive(TS))]
25955#[cfg_attr(feature = "ts", ts(export))]
25956pub struct RC_CHANNELS_SCALED_DATA {
25957    #[doc = "Timestamp (time since system boot)."]
25958    pub time_boot_ms: u32,
25959    #[doc = "RC channel 1 value scaled."]
25960    pub chan1_scaled: i16,
25961    #[doc = "RC channel 2 value scaled."]
25962    pub chan2_scaled: i16,
25963    #[doc = "RC channel 3 value scaled."]
25964    pub chan3_scaled: i16,
25965    #[doc = "RC channel 4 value scaled."]
25966    pub chan4_scaled: i16,
25967    #[doc = "RC channel 5 value scaled."]
25968    pub chan5_scaled: i16,
25969    #[doc = "RC channel 6 value scaled."]
25970    pub chan6_scaled: i16,
25971    #[doc = "RC channel 7 value scaled."]
25972    pub chan7_scaled: i16,
25973    #[doc = "RC channel 8 value scaled."]
25974    pub chan8_scaled: i16,
25975    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25976    pub port: u8,
25977    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25978    pub rssi: u8,
25979}
25980impl RC_CHANNELS_SCALED_DATA {
25981    pub const ENCODED_LEN: usize = 22usize;
25982    pub const DEFAULT: Self = Self {
25983        time_boot_ms: 0_u32,
25984        chan1_scaled: 0_i16,
25985        chan2_scaled: 0_i16,
25986        chan3_scaled: 0_i16,
25987        chan4_scaled: 0_i16,
25988        chan5_scaled: 0_i16,
25989        chan6_scaled: 0_i16,
25990        chan7_scaled: 0_i16,
25991        chan8_scaled: 0_i16,
25992        port: 0_u8,
25993        rssi: 0_u8,
25994    };
25995    #[cfg(feature = "arbitrary")]
25996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25997        use arbitrary::{Arbitrary, Unstructured};
25998        let mut buf = [0u8; 1024];
25999        rng.fill_bytes(&mut buf);
26000        let mut unstructured = Unstructured::new(&buf);
26001        Self::arbitrary(&mut unstructured).unwrap_or_default()
26002    }
26003}
26004impl Default for RC_CHANNELS_SCALED_DATA {
26005    fn default() -> Self {
26006        Self::DEFAULT.clone()
26007    }
26008}
26009impl MessageData for RC_CHANNELS_SCALED_DATA {
26010    type Message = MavMessage;
26011    const ID: u32 = 34u32;
26012    const NAME: &'static str = "RC_CHANNELS_SCALED";
26013    const EXTRA_CRC: u8 = 237u8;
26014    const ENCODED_LEN: usize = 22usize;
26015    fn deser(
26016        _version: MavlinkVersion,
26017        __input: &[u8],
26018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26019        let avail_len = __input.len();
26020        let mut payload_buf = [0; Self::ENCODED_LEN];
26021        let mut buf = if avail_len < Self::ENCODED_LEN {
26022            payload_buf[0..avail_len].copy_from_slice(__input);
26023            Bytes::new(&payload_buf)
26024        } else {
26025            Bytes::new(__input)
26026        };
26027        let mut __struct = Self::default();
26028        __struct.time_boot_ms = buf.get_u32_le()?;
26029        __struct.chan1_scaled = buf.get_i16_le()?;
26030        __struct.chan2_scaled = buf.get_i16_le()?;
26031        __struct.chan3_scaled = buf.get_i16_le()?;
26032        __struct.chan4_scaled = buf.get_i16_le()?;
26033        __struct.chan5_scaled = buf.get_i16_le()?;
26034        __struct.chan6_scaled = buf.get_i16_le()?;
26035        __struct.chan7_scaled = buf.get_i16_le()?;
26036        __struct.chan8_scaled = buf.get_i16_le()?;
26037        __struct.port = buf.get_u8()?;
26038        __struct.rssi = buf.get_u8()?;
26039        Ok(__struct)
26040    }
26041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26042        let mut __tmp = BytesMut::new(bytes);
26043        #[allow(clippy::absurd_extreme_comparisons)]
26044        #[allow(unused_comparisons)]
26045        if __tmp.remaining() < Self::ENCODED_LEN {
26046            panic!(
26047                "buffer is too small (need {} bytes, but got {})",
26048                Self::ENCODED_LEN,
26049                __tmp.remaining(),
26050            )
26051        }
26052        __tmp.put_u32_le(self.time_boot_ms);
26053        __tmp.put_i16_le(self.chan1_scaled);
26054        __tmp.put_i16_le(self.chan2_scaled);
26055        __tmp.put_i16_le(self.chan3_scaled);
26056        __tmp.put_i16_le(self.chan4_scaled);
26057        __tmp.put_i16_le(self.chan5_scaled);
26058        __tmp.put_i16_le(self.chan6_scaled);
26059        __tmp.put_i16_le(self.chan7_scaled);
26060        __tmp.put_i16_le(self.chan8_scaled);
26061        __tmp.put_u8(self.port);
26062        __tmp.put_u8(self.rssi);
26063        if matches!(version, MavlinkVersion::V2) {
26064            let len = __tmp.len();
26065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26066        } else {
26067            __tmp.len()
26068        }
26069    }
26070}
26071#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26072#[doc = "Request a data stream."]
26073#[doc = ""]
26074#[doc = "ID: 66"]
26075#[derive(Debug, Clone, PartialEq)]
26076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26078#[cfg_attr(feature = "ts", derive(TS))]
26079#[cfg_attr(feature = "ts", ts(export))]
26080pub struct REQUEST_DATA_STREAM_DATA {
26081    #[doc = "The requested message rate"]
26082    pub req_message_rate: u16,
26083    #[doc = "The target requested to send the message stream."]
26084    pub target_system: u8,
26085    #[doc = "The target requested to send the message stream."]
26086    pub target_component: u8,
26087    #[doc = "The ID of the requested data stream"]
26088    pub req_stream_id: u8,
26089    #[doc = "1 to start sending, 0 to stop sending."]
26090    pub start_stop: u8,
26091}
26092impl REQUEST_DATA_STREAM_DATA {
26093    pub const ENCODED_LEN: usize = 6usize;
26094    pub const DEFAULT: Self = Self {
26095        req_message_rate: 0_u16,
26096        target_system: 0_u8,
26097        target_component: 0_u8,
26098        req_stream_id: 0_u8,
26099        start_stop: 0_u8,
26100    };
26101    #[cfg(feature = "arbitrary")]
26102    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26103        use arbitrary::{Arbitrary, Unstructured};
26104        let mut buf = [0u8; 1024];
26105        rng.fill_bytes(&mut buf);
26106        let mut unstructured = Unstructured::new(&buf);
26107        Self::arbitrary(&mut unstructured).unwrap_or_default()
26108    }
26109}
26110impl Default for REQUEST_DATA_STREAM_DATA {
26111    fn default() -> Self {
26112        Self::DEFAULT.clone()
26113    }
26114}
26115impl MessageData for REQUEST_DATA_STREAM_DATA {
26116    type Message = MavMessage;
26117    const ID: u32 = 66u32;
26118    const NAME: &'static str = "REQUEST_DATA_STREAM";
26119    const EXTRA_CRC: u8 = 148u8;
26120    const ENCODED_LEN: usize = 6usize;
26121    fn deser(
26122        _version: MavlinkVersion,
26123        __input: &[u8],
26124    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26125        let avail_len = __input.len();
26126        let mut payload_buf = [0; Self::ENCODED_LEN];
26127        let mut buf = if avail_len < Self::ENCODED_LEN {
26128            payload_buf[0..avail_len].copy_from_slice(__input);
26129            Bytes::new(&payload_buf)
26130        } else {
26131            Bytes::new(__input)
26132        };
26133        let mut __struct = Self::default();
26134        __struct.req_message_rate = buf.get_u16_le()?;
26135        __struct.target_system = buf.get_u8()?;
26136        __struct.target_component = buf.get_u8()?;
26137        __struct.req_stream_id = buf.get_u8()?;
26138        __struct.start_stop = buf.get_u8()?;
26139        Ok(__struct)
26140    }
26141    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26142        let mut __tmp = BytesMut::new(bytes);
26143        #[allow(clippy::absurd_extreme_comparisons)]
26144        #[allow(unused_comparisons)]
26145        if __tmp.remaining() < Self::ENCODED_LEN {
26146            panic!(
26147                "buffer is too small (need {} bytes, but got {})",
26148                Self::ENCODED_LEN,
26149                __tmp.remaining(),
26150            )
26151        }
26152        __tmp.put_u16_le(self.req_message_rate);
26153        __tmp.put_u8(self.target_system);
26154        __tmp.put_u8(self.target_component);
26155        __tmp.put_u8(self.req_stream_id);
26156        __tmp.put_u8(self.start_stop);
26157        if matches!(version, MavlinkVersion::V2) {
26158            let len = __tmp.len();
26159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26160        } else {
26161            __tmp.len()
26162        }
26163    }
26164}
26165#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26166#[doc = ""]
26167#[doc = "ID: 412"]
26168#[derive(Debug, Clone, PartialEq)]
26169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26171#[cfg_attr(feature = "ts", derive(TS))]
26172#[cfg_attr(feature = "ts", ts(export))]
26173pub struct REQUEST_EVENT_DATA {
26174    #[doc = "First sequence number of the requested event."]
26175    pub first_sequence: u16,
26176    #[doc = "Last sequence number of the requested event."]
26177    pub last_sequence: u16,
26178    #[doc = "System ID"]
26179    pub target_system: u8,
26180    #[doc = "Component ID"]
26181    pub target_component: u8,
26182}
26183impl REQUEST_EVENT_DATA {
26184    pub const ENCODED_LEN: usize = 6usize;
26185    pub const DEFAULT: Self = Self {
26186        first_sequence: 0_u16,
26187        last_sequence: 0_u16,
26188        target_system: 0_u8,
26189        target_component: 0_u8,
26190    };
26191    #[cfg(feature = "arbitrary")]
26192    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26193        use arbitrary::{Arbitrary, Unstructured};
26194        let mut buf = [0u8; 1024];
26195        rng.fill_bytes(&mut buf);
26196        let mut unstructured = Unstructured::new(&buf);
26197        Self::arbitrary(&mut unstructured).unwrap_or_default()
26198    }
26199}
26200impl Default for REQUEST_EVENT_DATA {
26201    fn default() -> Self {
26202        Self::DEFAULT.clone()
26203    }
26204}
26205impl MessageData for REQUEST_EVENT_DATA {
26206    type Message = MavMessage;
26207    const ID: u32 = 412u32;
26208    const NAME: &'static str = "REQUEST_EVENT";
26209    const EXTRA_CRC: u8 = 33u8;
26210    const ENCODED_LEN: usize = 6usize;
26211    fn deser(
26212        _version: MavlinkVersion,
26213        __input: &[u8],
26214    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26215        let avail_len = __input.len();
26216        let mut payload_buf = [0; Self::ENCODED_LEN];
26217        let mut buf = if avail_len < Self::ENCODED_LEN {
26218            payload_buf[0..avail_len].copy_from_slice(__input);
26219            Bytes::new(&payload_buf)
26220        } else {
26221            Bytes::new(__input)
26222        };
26223        let mut __struct = Self::default();
26224        __struct.first_sequence = buf.get_u16_le()?;
26225        __struct.last_sequence = buf.get_u16_le()?;
26226        __struct.target_system = buf.get_u8()?;
26227        __struct.target_component = buf.get_u8()?;
26228        Ok(__struct)
26229    }
26230    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26231        let mut __tmp = BytesMut::new(bytes);
26232        #[allow(clippy::absurd_extreme_comparisons)]
26233        #[allow(unused_comparisons)]
26234        if __tmp.remaining() < Self::ENCODED_LEN {
26235            panic!(
26236                "buffer is too small (need {} bytes, but got {})",
26237                Self::ENCODED_LEN,
26238                __tmp.remaining(),
26239            )
26240        }
26241        __tmp.put_u16_le(self.first_sequence);
26242        __tmp.put_u16_le(self.last_sequence);
26243        __tmp.put_u8(self.target_system);
26244        __tmp.put_u8(self.target_component);
26245        if matches!(version, MavlinkVersion::V2) {
26246            let len = __tmp.len();
26247            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26248        } else {
26249            __tmp.len()
26250        }
26251    }
26252}
26253#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26254#[doc = ""]
26255#[doc = "ID: 142"]
26256#[derive(Debug, Clone, PartialEq)]
26257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26259#[cfg_attr(feature = "ts", derive(TS))]
26260#[cfg_attr(feature = "ts", ts(export))]
26261pub struct RESOURCE_REQUEST_DATA {
26262    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26263    pub request_id: u8,
26264    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26265    pub uri_type: u8,
26266    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26267    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26268    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26269    pub uri: [u8; 120],
26270    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26271    pub transfer_type: u8,
26272    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26273    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26274    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26275    pub storage: [u8; 120],
26276}
26277impl RESOURCE_REQUEST_DATA {
26278    pub const ENCODED_LEN: usize = 243usize;
26279    pub const DEFAULT: Self = Self {
26280        request_id: 0_u8,
26281        uri_type: 0_u8,
26282        uri: [0_u8; 120usize],
26283        transfer_type: 0_u8,
26284        storage: [0_u8; 120usize],
26285    };
26286    #[cfg(feature = "arbitrary")]
26287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26288        use arbitrary::{Arbitrary, Unstructured};
26289        let mut buf = [0u8; 1024];
26290        rng.fill_bytes(&mut buf);
26291        let mut unstructured = Unstructured::new(&buf);
26292        Self::arbitrary(&mut unstructured).unwrap_or_default()
26293    }
26294}
26295impl Default for RESOURCE_REQUEST_DATA {
26296    fn default() -> Self {
26297        Self::DEFAULT.clone()
26298    }
26299}
26300impl MessageData for RESOURCE_REQUEST_DATA {
26301    type Message = MavMessage;
26302    const ID: u32 = 142u32;
26303    const NAME: &'static str = "RESOURCE_REQUEST";
26304    const EXTRA_CRC: u8 = 72u8;
26305    const ENCODED_LEN: usize = 243usize;
26306    fn deser(
26307        _version: MavlinkVersion,
26308        __input: &[u8],
26309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26310        let avail_len = __input.len();
26311        let mut payload_buf = [0; Self::ENCODED_LEN];
26312        let mut buf = if avail_len < Self::ENCODED_LEN {
26313            payload_buf[0..avail_len].copy_from_slice(__input);
26314            Bytes::new(&payload_buf)
26315        } else {
26316            Bytes::new(__input)
26317        };
26318        let mut __struct = Self::default();
26319        __struct.request_id = buf.get_u8()?;
26320        __struct.uri_type = buf.get_u8()?;
26321        for v in &mut __struct.uri {
26322            let val = buf.get_u8()?;
26323            *v = val;
26324        }
26325        __struct.transfer_type = buf.get_u8()?;
26326        for v in &mut __struct.storage {
26327            let val = buf.get_u8()?;
26328            *v = val;
26329        }
26330        Ok(__struct)
26331    }
26332    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26333        let mut __tmp = BytesMut::new(bytes);
26334        #[allow(clippy::absurd_extreme_comparisons)]
26335        #[allow(unused_comparisons)]
26336        if __tmp.remaining() < Self::ENCODED_LEN {
26337            panic!(
26338                "buffer is too small (need {} bytes, but got {})",
26339                Self::ENCODED_LEN,
26340                __tmp.remaining(),
26341            )
26342        }
26343        __tmp.put_u8(self.request_id);
26344        __tmp.put_u8(self.uri_type);
26345        for val in &self.uri {
26346            __tmp.put_u8(*val);
26347        }
26348        __tmp.put_u8(self.transfer_type);
26349        for val in &self.storage {
26350            __tmp.put_u8(*val);
26351        }
26352        if matches!(version, MavlinkVersion::V2) {
26353            let len = __tmp.len();
26354            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26355        } else {
26356            __tmp.len()
26357        }
26358    }
26359}
26360#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26361#[doc = ""]
26362#[doc = "ID: 413"]
26363#[derive(Debug, Clone, PartialEq)]
26364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26366#[cfg_attr(feature = "ts", derive(TS))]
26367#[cfg_attr(feature = "ts", ts(export))]
26368pub struct RESPONSE_EVENT_ERROR_DATA {
26369    #[doc = "Sequence number."]
26370    pub sequence: u16,
26371    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26372    pub sequence_oldest_available: u16,
26373    #[doc = "System ID"]
26374    pub target_system: u8,
26375    #[doc = "Component ID"]
26376    pub target_component: u8,
26377    #[doc = "Error reason."]
26378    pub reason: MavEventErrorReason,
26379}
26380impl RESPONSE_EVENT_ERROR_DATA {
26381    pub const ENCODED_LEN: usize = 7usize;
26382    pub const DEFAULT: Self = Self {
26383        sequence: 0_u16,
26384        sequence_oldest_available: 0_u16,
26385        target_system: 0_u8,
26386        target_component: 0_u8,
26387        reason: MavEventErrorReason::DEFAULT,
26388    };
26389    #[cfg(feature = "arbitrary")]
26390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26391        use arbitrary::{Arbitrary, Unstructured};
26392        let mut buf = [0u8; 1024];
26393        rng.fill_bytes(&mut buf);
26394        let mut unstructured = Unstructured::new(&buf);
26395        Self::arbitrary(&mut unstructured).unwrap_or_default()
26396    }
26397}
26398impl Default for RESPONSE_EVENT_ERROR_DATA {
26399    fn default() -> Self {
26400        Self::DEFAULT.clone()
26401    }
26402}
26403impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26404    type Message = MavMessage;
26405    const ID: u32 = 413u32;
26406    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26407    const EXTRA_CRC: u8 = 77u8;
26408    const ENCODED_LEN: usize = 7usize;
26409    fn deser(
26410        _version: MavlinkVersion,
26411        __input: &[u8],
26412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26413        let avail_len = __input.len();
26414        let mut payload_buf = [0; Self::ENCODED_LEN];
26415        let mut buf = if avail_len < Self::ENCODED_LEN {
26416            payload_buf[0..avail_len].copy_from_slice(__input);
26417            Bytes::new(&payload_buf)
26418        } else {
26419            Bytes::new(__input)
26420        };
26421        let mut __struct = Self::default();
26422        __struct.sequence = buf.get_u16_le()?;
26423        __struct.sequence_oldest_available = buf.get_u16_le()?;
26424        __struct.target_system = buf.get_u8()?;
26425        __struct.target_component = buf.get_u8()?;
26426        let tmp = buf.get_u8()?;
26427        __struct.reason =
26428            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26429                enum_type: "MavEventErrorReason",
26430                value: tmp as u64,
26431            })?;
26432        Ok(__struct)
26433    }
26434    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26435        let mut __tmp = BytesMut::new(bytes);
26436        #[allow(clippy::absurd_extreme_comparisons)]
26437        #[allow(unused_comparisons)]
26438        if __tmp.remaining() < Self::ENCODED_LEN {
26439            panic!(
26440                "buffer is too small (need {} bytes, but got {})",
26441                Self::ENCODED_LEN,
26442                __tmp.remaining(),
26443            )
26444        }
26445        __tmp.put_u16_le(self.sequence);
26446        __tmp.put_u16_le(self.sequence_oldest_available);
26447        __tmp.put_u8(self.target_system);
26448        __tmp.put_u8(self.target_component);
26449        __tmp.put_u8(self.reason as u8);
26450        if matches!(version, MavlinkVersion::V2) {
26451            let len = __tmp.len();
26452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26453        } else {
26454            __tmp.len()
26455        }
26456    }
26457}
26458#[doc = "Read out the safety zone the MAV currently assumes."]
26459#[doc = ""]
26460#[doc = "ID: 55"]
26461#[derive(Debug, Clone, PartialEq)]
26462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26464#[cfg_attr(feature = "ts", derive(TS))]
26465#[cfg_attr(feature = "ts", ts(export))]
26466pub struct SAFETY_ALLOWED_AREA_DATA {
26467    #[doc = "x position 1 / Latitude 1"]
26468    pub p1x: f32,
26469    #[doc = "y position 1 / Longitude 1"]
26470    pub p1y: f32,
26471    #[doc = "z position 1 / Altitude 1"]
26472    pub p1z: f32,
26473    #[doc = "x position 2 / Latitude 2"]
26474    pub p2x: f32,
26475    #[doc = "y position 2 / Longitude 2"]
26476    pub p2y: f32,
26477    #[doc = "z position 2 / Altitude 2"]
26478    pub p2z: f32,
26479    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26480    pub frame: MavFrame,
26481}
26482impl SAFETY_ALLOWED_AREA_DATA {
26483    pub const ENCODED_LEN: usize = 25usize;
26484    pub const DEFAULT: Self = Self {
26485        p1x: 0.0_f32,
26486        p1y: 0.0_f32,
26487        p1z: 0.0_f32,
26488        p2x: 0.0_f32,
26489        p2y: 0.0_f32,
26490        p2z: 0.0_f32,
26491        frame: MavFrame::DEFAULT,
26492    };
26493    #[cfg(feature = "arbitrary")]
26494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26495        use arbitrary::{Arbitrary, Unstructured};
26496        let mut buf = [0u8; 1024];
26497        rng.fill_bytes(&mut buf);
26498        let mut unstructured = Unstructured::new(&buf);
26499        Self::arbitrary(&mut unstructured).unwrap_or_default()
26500    }
26501}
26502impl Default for SAFETY_ALLOWED_AREA_DATA {
26503    fn default() -> Self {
26504        Self::DEFAULT.clone()
26505    }
26506}
26507impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26508    type Message = MavMessage;
26509    const ID: u32 = 55u32;
26510    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26511    const EXTRA_CRC: u8 = 3u8;
26512    const ENCODED_LEN: usize = 25usize;
26513    fn deser(
26514        _version: MavlinkVersion,
26515        __input: &[u8],
26516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26517        let avail_len = __input.len();
26518        let mut payload_buf = [0; Self::ENCODED_LEN];
26519        let mut buf = if avail_len < Self::ENCODED_LEN {
26520            payload_buf[0..avail_len].copy_from_slice(__input);
26521            Bytes::new(&payload_buf)
26522        } else {
26523            Bytes::new(__input)
26524        };
26525        let mut __struct = Self::default();
26526        __struct.p1x = buf.get_f32_le()?;
26527        __struct.p1y = buf.get_f32_le()?;
26528        __struct.p1z = buf.get_f32_le()?;
26529        __struct.p2x = buf.get_f32_le()?;
26530        __struct.p2y = buf.get_f32_le()?;
26531        __struct.p2z = buf.get_f32_le()?;
26532        let tmp = buf.get_u8()?;
26533        __struct.frame =
26534            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26535                enum_type: "MavFrame",
26536                value: tmp as u64,
26537            })?;
26538        Ok(__struct)
26539    }
26540    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26541        let mut __tmp = BytesMut::new(bytes);
26542        #[allow(clippy::absurd_extreme_comparisons)]
26543        #[allow(unused_comparisons)]
26544        if __tmp.remaining() < Self::ENCODED_LEN {
26545            panic!(
26546                "buffer is too small (need {} bytes, but got {})",
26547                Self::ENCODED_LEN,
26548                __tmp.remaining(),
26549            )
26550        }
26551        __tmp.put_f32_le(self.p1x);
26552        __tmp.put_f32_le(self.p1y);
26553        __tmp.put_f32_le(self.p1z);
26554        __tmp.put_f32_le(self.p2x);
26555        __tmp.put_f32_le(self.p2y);
26556        __tmp.put_f32_le(self.p2z);
26557        __tmp.put_u8(self.frame as u8);
26558        if matches!(version, MavlinkVersion::V2) {
26559            let len = __tmp.len();
26560            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26561        } else {
26562            __tmp.len()
26563        }
26564    }
26565}
26566#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26567#[doc = ""]
26568#[doc = "ID: 54"]
26569#[derive(Debug, Clone, PartialEq)]
26570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26572#[cfg_attr(feature = "ts", derive(TS))]
26573#[cfg_attr(feature = "ts", ts(export))]
26574pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26575    #[doc = "x position 1 / Latitude 1"]
26576    pub p1x: f32,
26577    #[doc = "y position 1 / Longitude 1"]
26578    pub p1y: f32,
26579    #[doc = "z position 1 / Altitude 1"]
26580    pub p1z: f32,
26581    #[doc = "x position 2 / Latitude 2"]
26582    pub p2x: f32,
26583    #[doc = "y position 2 / Longitude 2"]
26584    pub p2y: f32,
26585    #[doc = "z position 2 / Altitude 2"]
26586    pub p2z: f32,
26587    #[doc = "System ID"]
26588    pub target_system: u8,
26589    #[doc = "Component ID"]
26590    pub target_component: u8,
26591    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26592    pub frame: MavFrame,
26593}
26594impl SAFETY_SET_ALLOWED_AREA_DATA {
26595    pub const ENCODED_LEN: usize = 27usize;
26596    pub const DEFAULT: Self = Self {
26597        p1x: 0.0_f32,
26598        p1y: 0.0_f32,
26599        p1z: 0.0_f32,
26600        p2x: 0.0_f32,
26601        p2y: 0.0_f32,
26602        p2z: 0.0_f32,
26603        target_system: 0_u8,
26604        target_component: 0_u8,
26605        frame: MavFrame::DEFAULT,
26606    };
26607    #[cfg(feature = "arbitrary")]
26608    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26609        use arbitrary::{Arbitrary, Unstructured};
26610        let mut buf = [0u8; 1024];
26611        rng.fill_bytes(&mut buf);
26612        let mut unstructured = Unstructured::new(&buf);
26613        Self::arbitrary(&mut unstructured).unwrap_or_default()
26614    }
26615}
26616impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26617    fn default() -> Self {
26618        Self::DEFAULT.clone()
26619    }
26620}
26621impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26622    type Message = MavMessage;
26623    const ID: u32 = 54u32;
26624    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26625    const EXTRA_CRC: u8 = 15u8;
26626    const ENCODED_LEN: usize = 27usize;
26627    fn deser(
26628        _version: MavlinkVersion,
26629        __input: &[u8],
26630    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26631        let avail_len = __input.len();
26632        let mut payload_buf = [0; Self::ENCODED_LEN];
26633        let mut buf = if avail_len < Self::ENCODED_LEN {
26634            payload_buf[0..avail_len].copy_from_slice(__input);
26635            Bytes::new(&payload_buf)
26636        } else {
26637            Bytes::new(__input)
26638        };
26639        let mut __struct = Self::default();
26640        __struct.p1x = buf.get_f32_le()?;
26641        __struct.p1y = buf.get_f32_le()?;
26642        __struct.p1z = buf.get_f32_le()?;
26643        __struct.p2x = buf.get_f32_le()?;
26644        __struct.p2y = buf.get_f32_le()?;
26645        __struct.p2z = buf.get_f32_le()?;
26646        __struct.target_system = buf.get_u8()?;
26647        __struct.target_component = buf.get_u8()?;
26648        let tmp = buf.get_u8()?;
26649        __struct.frame =
26650            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26651                enum_type: "MavFrame",
26652                value: tmp as u64,
26653            })?;
26654        Ok(__struct)
26655    }
26656    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26657        let mut __tmp = BytesMut::new(bytes);
26658        #[allow(clippy::absurd_extreme_comparisons)]
26659        #[allow(unused_comparisons)]
26660        if __tmp.remaining() < Self::ENCODED_LEN {
26661            panic!(
26662                "buffer is too small (need {} bytes, but got {})",
26663                Self::ENCODED_LEN,
26664                __tmp.remaining(),
26665            )
26666        }
26667        __tmp.put_f32_le(self.p1x);
26668        __tmp.put_f32_le(self.p1y);
26669        __tmp.put_f32_le(self.p1z);
26670        __tmp.put_f32_le(self.p2x);
26671        __tmp.put_f32_le(self.p2y);
26672        __tmp.put_f32_le(self.p2z);
26673        __tmp.put_u8(self.target_system);
26674        __tmp.put_u8(self.target_component);
26675        __tmp.put_u8(self.frame as u8);
26676        if matches!(version, MavlinkVersion::V2) {
26677            let len = __tmp.len();
26678            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26679        } else {
26680            __tmp.len()
26681        }
26682    }
26683}
26684#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26685#[doc = ""]
26686#[doc = "ID: 26"]
26687#[derive(Debug, Clone, PartialEq)]
26688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26690#[cfg_attr(feature = "ts", derive(TS))]
26691#[cfg_attr(feature = "ts", ts(export))]
26692pub struct SCALED_IMU_DATA {
26693    #[doc = "Timestamp (time since system boot)."]
26694    pub time_boot_ms: u32,
26695    #[doc = "X acceleration"]
26696    pub xacc: i16,
26697    #[doc = "Y acceleration"]
26698    pub yacc: i16,
26699    #[doc = "Z acceleration"]
26700    pub zacc: i16,
26701    #[doc = "Angular speed around X axis"]
26702    pub xgyro: i16,
26703    #[doc = "Angular speed around Y axis"]
26704    pub ygyro: i16,
26705    #[doc = "Angular speed around Z axis"]
26706    pub zgyro: i16,
26707    #[doc = "X Magnetic field"]
26708    pub xmag: i16,
26709    #[doc = "Y Magnetic field"]
26710    pub ymag: i16,
26711    #[doc = "Z Magnetic field"]
26712    pub zmag: i16,
26713    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26714    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26715    pub temperature: i16,
26716}
26717impl SCALED_IMU_DATA {
26718    pub const ENCODED_LEN: usize = 24usize;
26719    pub const DEFAULT: Self = Self {
26720        time_boot_ms: 0_u32,
26721        xacc: 0_i16,
26722        yacc: 0_i16,
26723        zacc: 0_i16,
26724        xgyro: 0_i16,
26725        ygyro: 0_i16,
26726        zgyro: 0_i16,
26727        xmag: 0_i16,
26728        ymag: 0_i16,
26729        zmag: 0_i16,
26730        temperature: 0_i16,
26731    };
26732    #[cfg(feature = "arbitrary")]
26733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26734        use arbitrary::{Arbitrary, Unstructured};
26735        let mut buf = [0u8; 1024];
26736        rng.fill_bytes(&mut buf);
26737        let mut unstructured = Unstructured::new(&buf);
26738        Self::arbitrary(&mut unstructured).unwrap_or_default()
26739    }
26740}
26741impl Default for SCALED_IMU_DATA {
26742    fn default() -> Self {
26743        Self::DEFAULT.clone()
26744    }
26745}
26746impl MessageData for SCALED_IMU_DATA {
26747    type Message = MavMessage;
26748    const ID: u32 = 26u32;
26749    const NAME: &'static str = "SCALED_IMU";
26750    const EXTRA_CRC: u8 = 170u8;
26751    const ENCODED_LEN: usize = 24usize;
26752    fn deser(
26753        _version: MavlinkVersion,
26754        __input: &[u8],
26755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26756        let avail_len = __input.len();
26757        let mut payload_buf = [0; Self::ENCODED_LEN];
26758        let mut buf = if avail_len < Self::ENCODED_LEN {
26759            payload_buf[0..avail_len].copy_from_slice(__input);
26760            Bytes::new(&payload_buf)
26761        } else {
26762            Bytes::new(__input)
26763        };
26764        let mut __struct = Self::default();
26765        __struct.time_boot_ms = buf.get_u32_le()?;
26766        __struct.xacc = buf.get_i16_le()?;
26767        __struct.yacc = buf.get_i16_le()?;
26768        __struct.zacc = buf.get_i16_le()?;
26769        __struct.xgyro = buf.get_i16_le()?;
26770        __struct.ygyro = buf.get_i16_le()?;
26771        __struct.zgyro = buf.get_i16_le()?;
26772        __struct.xmag = buf.get_i16_le()?;
26773        __struct.ymag = buf.get_i16_le()?;
26774        __struct.zmag = buf.get_i16_le()?;
26775        __struct.temperature = buf.get_i16_le()?;
26776        Ok(__struct)
26777    }
26778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26779        let mut __tmp = BytesMut::new(bytes);
26780        #[allow(clippy::absurd_extreme_comparisons)]
26781        #[allow(unused_comparisons)]
26782        if __tmp.remaining() < Self::ENCODED_LEN {
26783            panic!(
26784                "buffer is too small (need {} bytes, but got {})",
26785                Self::ENCODED_LEN,
26786                __tmp.remaining(),
26787            )
26788        }
26789        __tmp.put_u32_le(self.time_boot_ms);
26790        __tmp.put_i16_le(self.xacc);
26791        __tmp.put_i16_le(self.yacc);
26792        __tmp.put_i16_le(self.zacc);
26793        __tmp.put_i16_le(self.xgyro);
26794        __tmp.put_i16_le(self.ygyro);
26795        __tmp.put_i16_le(self.zgyro);
26796        __tmp.put_i16_le(self.xmag);
26797        __tmp.put_i16_le(self.ymag);
26798        __tmp.put_i16_le(self.zmag);
26799        if matches!(version, MavlinkVersion::V2) {
26800            __tmp.put_i16_le(self.temperature);
26801            let len = __tmp.len();
26802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26803        } else {
26804            __tmp.len()
26805        }
26806    }
26807}
26808#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26809#[doc = ""]
26810#[doc = "ID: 116"]
26811#[derive(Debug, Clone, PartialEq)]
26812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26814#[cfg_attr(feature = "ts", derive(TS))]
26815#[cfg_attr(feature = "ts", ts(export))]
26816pub struct SCALED_IMU2_DATA {
26817    #[doc = "Timestamp (time since system boot)."]
26818    pub time_boot_ms: u32,
26819    #[doc = "X acceleration"]
26820    pub xacc: i16,
26821    #[doc = "Y acceleration"]
26822    pub yacc: i16,
26823    #[doc = "Z acceleration"]
26824    pub zacc: i16,
26825    #[doc = "Angular speed around X axis"]
26826    pub xgyro: i16,
26827    #[doc = "Angular speed around Y axis"]
26828    pub ygyro: i16,
26829    #[doc = "Angular speed around Z axis"]
26830    pub zgyro: i16,
26831    #[doc = "X Magnetic field"]
26832    pub xmag: i16,
26833    #[doc = "Y Magnetic field"]
26834    pub ymag: i16,
26835    #[doc = "Z Magnetic field"]
26836    pub zmag: i16,
26837    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26838    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26839    pub temperature: i16,
26840}
26841impl SCALED_IMU2_DATA {
26842    pub const ENCODED_LEN: usize = 24usize;
26843    pub const DEFAULT: Self = Self {
26844        time_boot_ms: 0_u32,
26845        xacc: 0_i16,
26846        yacc: 0_i16,
26847        zacc: 0_i16,
26848        xgyro: 0_i16,
26849        ygyro: 0_i16,
26850        zgyro: 0_i16,
26851        xmag: 0_i16,
26852        ymag: 0_i16,
26853        zmag: 0_i16,
26854        temperature: 0_i16,
26855    };
26856    #[cfg(feature = "arbitrary")]
26857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26858        use arbitrary::{Arbitrary, Unstructured};
26859        let mut buf = [0u8; 1024];
26860        rng.fill_bytes(&mut buf);
26861        let mut unstructured = Unstructured::new(&buf);
26862        Self::arbitrary(&mut unstructured).unwrap_or_default()
26863    }
26864}
26865impl Default for SCALED_IMU2_DATA {
26866    fn default() -> Self {
26867        Self::DEFAULT.clone()
26868    }
26869}
26870impl MessageData for SCALED_IMU2_DATA {
26871    type Message = MavMessage;
26872    const ID: u32 = 116u32;
26873    const NAME: &'static str = "SCALED_IMU2";
26874    const EXTRA_CRC: u8 = 76u8;
26875    const ENCODED_LEN: usize = 24usize;
26876    fn deser(
26877        _version: MavlinkVersion,
26878        __input: &[u8],
26879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26880        let avail_len = __input.len();
26881        let mut payload_buf = [0; Self::ENCODED_LEN];
26882        let mut buf = if avail_len < Self::ENCODED_LEN {
26883            payload_buf[0..avail_len].copy_from_slice(__input);
26884            Bytes::new(&payload_buf)
26885        } else {
26886            Bytes::new(__input)
26887        };
26888        let mut __struct = Self::default();
26889        __struct.time_boot_ms = buf.get_u32_le()?;
26890        __struct.xacc = buf.get_i16_le()?;
26891        __struct.yacc = buf.get_i16_le()?;
26892        __struct.zacc = buf.get_i16_le()?;
26893        __struct.xgyro = buf.get_i16_le()?;
26894        __struct.ygyro = buf.get_i16_le()?;
26895        __struct.zgyro = buf.get_i16_le()?;
26896        __struct.xmag = buf.get_i16_le()?;
26897        __struct.ymag = buf.get_i16_le()?;
26898        __struct.zmag = buf.get_i16_le()?;
26899        __struct.temperature = buf.get_i16_le()?;
26900        Ok(__struct)
26901    }
26902    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26903        let mut __tmp = BytesMut::new(bytes);
26904        #[allow(clippy::absurd_extreme_comparisons)]
26905        #[allow(unused_comparisons)]
26906        if __tmp.remaining() < Self::ENCODED_LEN {
26907            panic!(
26908                "buffer is too small (need {} bytes, but got {})",
26909                Self::ENCODED_LEN,
26910                __tmp.remaining(),
26911            )
26912        }
26913        __tmp.put_u32_le(self.time_boot_ms);
26914        __tmp.put_i16_le(self.xacc);
26915        __tmp.put_i16_le(self.yacc);
26916        __tmp.put_i16_le(self.zacc);
26917        __tmp.put_i16_le(self.xgyro);
26918        __tmp.put_i16_le(self.ygyro);
26919        __tmp.put_i16_le(self.zgyro);
26920        __tmp.put_i16_le(self.xmag);
26921        __tmp.put_i16_le(self.ymag);
26922        __tmp.put_i16_le(self.zmag);
26923        if matches!(version, MavlinkVersion::V2) {
26924            __tmp.put_i16_le(self.temperature);
26925            let len = __tmp.len();
26926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26927        } else {
26928            __tmp.len()
26929        }
26930    }
26931}
26932#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26933#[doc = ""]
26934#[doc = "ID: 129"]
26935#[derive(Debug, Clone, PartialEq)]
26936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26938#[cfg_attr(feature = "ts", derive(TS))]
26939#[cfg_attr(feature = "ts", ts(export))]
26940pub struct SCALED_IMU3_DATA {
26941    #[doc = "Timestamp (time since system boot)."]
26942    pub time_boot_ms: u32,
26943    #[doc = "X acceleration"]
26944    pub xacc: i16,
26945    #[doc = "Y acceleration"]
26946    pub yacc: i16,
26947    #[doc = "Z acceleration"]
26948    pub zacc: i16,
26949    #[doc = "Angular speed around X axis"]
26950    pub xgyro: i16,
26951    #[doc = "Angular speed around Y axis"]
26952    pub ygyro: i16,
26953    #[doc = "Angular speed around Z axis"]
26954    pub zgyro: i16,
26955    #[doc = "X Magnetic field"]
26956    pub xmag: i16,
26957    #[doc = "Y Magnetic field"]
26958    pub ymag: i16,
26959    #[doc = "Z Magnetic field"]
26960    pub zmag: i16,
26961    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26962    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26963    pub temperature: i16,
26964}
26965impl SCALED_IMU3_DATA {
26966    pub const ENCODED_LEN: usize = 24usize;
26967    pub const DEFAULT: Self = Self {
26968        time_boot_ms: 0_u32,
26969        xacc: 0_i16,
26970        yacc: 0_i16,
26971        zacc: 0_i16,
26972        xgyro: 0_i16,
26973        ygyro: 0_i16,
26974        zgyro: 0_i16,
26975        xmag: 0_i16,
26976        ymag: 0_i16,
26977        zmag: 0_i16,
26978        temperature: 0_i16,
26979    };
26980    #[cfg(feature = "arbitrary")]
26981    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26982        use arbitrary::{Arbitrary, Unstructured};
26983        let mut buf = [0u8; 1024];
26984        rng.fill_bytes(&mut buf);
26985        let mut unstructured = Unstructured::new(&buf);
26986        Self::arbitrary(&mut unstructured).unwrap_or_default()
26987    }
26988}
26989impl Default for SCALED_IMU3_DATA {
26990    fn default() -> Self {
26991        Self::DEFAULT.clone()
26992    }
26993}
26994impl MessageData for SCALED_IMU3_DATA {
26995    type Message = MavMessage;
26996    const ID: u32 = 129u32;
26997    const NAME: &'static str = "SCALED_IMU3";
26998    const EXTRA_CRC: u8 = 46u8;
26999    const ENCODED_LEN: usize = 24usize;
27000    fn deser(
27001        _version: MavlinkVersion,
27002        __input: &[u8],
27003    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27004        let avail_len = __input.len();
27005        let mut payload_buf = [0; Self::ENCODED_LEN];
27006        let mut buf = if avail_len < Self::ENCODED_LEN {
27007            payload_buf[0..avail_len].copy_from_slice(__input);
27008            Bytes::new(&payload_buf)
27009        } else {
27010            Bytes::new(__input)
27011        };
27012        let mut __struct = Self::default();
27013        __struct.time_boot_ms = buf.get_u32_le()?;
27014        __struct.xacc = buf.get_i16_le()?;
27015        __struct.yacc = buf.get_i16_le()?;
27016        __struct.zacc = buf.get_i16_le()?;
27017        __struct.xgyro = buf.get_i16_le()?;
27018        __struct.ygyro = buf.get_i16_le()?;
27019        __struct.zgyro = buf.get_i16_le()?;
27020        __struct.xmag = buf.get_i16_le()?;
27021        __struct.ymag = buf.get_i16_le()?;
27022        __struct.zmag = buf.get_i16_le()?;
27023        __struct.temperature = buf.get_i16_le()?;
27024        Ok(__struct)
27025    }
27026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27027        let mut __tmp = BytesMut::new(bytes);
27028        #[allow(clippy::absurd_extreme_comparisons)]
27029        #[allow(unused_comparisons)]
27030        if __tmp.remaining() < Self::ENCODED_LEN {
27031            panic!(
27032                "buffer is too small (need {} bytes, but got {})",
27033                Self::ENCODED_LEN,
27034                __tmp.remaining(),
27035            )
27036        }
27037        __tmp.put_u32_le(self.time_boot_ms);
27038        __tmp.put_i16_le(self.xacc);
27039        __tmp.put_i16_le(self.yacc);
27040        __tmp.put_i16_le(self.zacc);
27041        __tmp.put_i16_le(self.xgyro);
27042        __tmp.put_i16_le(self.ygyro);
27043        __tmp.put_i16_le(self.zgyro);
27044        __tmp.put_i16_le(self.xmag);
27045        __tmp.put_i16_le(self.ymag);
27046        __tmp.put_i16_le(self.zmag);
27047        if matches!(version, MavlinkVersion::V2) {
27048            __tmp.put_i16_le(self.temperature);
27049            let len = __tmp.len();
27050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27051        } else {
27052            __tmp.len()
27053        }
27054    }
27055}
27056#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27057#[doc = ""]
27058#[doc = "ID: 29"]
27059#[derive(Debug, Clone, PartialEq)]
27060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27062#[cfg_attr(feature = "ts", derive(TS))]
27063#[cfg_attr(feature = "ts", ts(export))]
27064pub struct SCALED_PRESSURE_DATA {
27065    #[doc = "Timestamp (time since system boot)."]
27066    pub time_boot_ms: u32,
27067    #[doc = "Absolute pressure"]
27068    pub press_abs: f32,
27069    #[doc = "Differential pressure 1"]
27070    pub press_diff: f32,
27071    #[doc = "Absolute pressure temperature"]
27072    pub temperature: i16,
27073    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27074    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27075    pub temperature_press_diff: i16,
27076}
27077impl SCALED_PRESSURE_DATA {
27078    pub const ENCODED_LEN: usize = 16usize;
27079    pub const DEFAULT: Self = Self {
27080        time_boot_ms: 0_u32,
27081        press_abs: 0.0_f32,
27082        press_diff: 0.0_f32,
27083        temperature: 0_i16,
27084        temperature_press_diff: 0_i16,
27085    };
27086    #[cfg(feature = "arbitrary")]
27087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27088        use arbitrary::{Arbitrary, Unstructured};
27089        let mut buf = [0u8; 1024];
27090        rng.fill_bytes(&mut buf);
27091        let mut unstructured = Unstructured::new(&buf);
27092        Self::arbitrary(&mut unstructured).unwrap_or_default()
27093    }
27094}
27095impl Default for SCALED_PRESSURE_DATA {
27096    fn default() -> Self {
27097        Self::DEFAULT.clone()
27098    }
27099}
27100impl MessageData for SCALED_PRESSURE_DATA {
27101    type Message = MavMessage;
27102    const ID: u32 = 29u32;
27103    const NAME: &'static str = "SCALED_PRESSURE";
27104    const EXTRA_CRC: u8 = 115u8;
27105    const ENCODED_LEN: usize = 16usize;
27106    fn deser(
27107        _version: MavlinkVersion,
27108        __input: &[u8],
27109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27110        let avail_len = __input.len();
27111        let mut payload_buf = [0; Self::ENCODED_LEN];
27112        let mut buf = if avail_len < Self::ENCODED_LEN {
27113            payload_buf[0..avail_len].copy_from_slice(__input);
27114            Bytes::new(&payload_buf)
27115        } else {
27116            Bytes::new(__input)
27117        };
27118        let mut __struct = Self::default();
27119        __struct.time_boot_ms = buf.get_u32_le()?;
27120        __struct.press_abs = buf.get_f32_le()?;
27121        __struct.press_diff = buf.get_f32_le()?;
27122        __struct.temperature = buf.get_i16_le()?;
27123        __struct.temperature_press_diff = buf.get_i16_le()?;
27124        Ok(__struct)
27125    }
27126    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27127        let mut __tmp = BytesMut::new(bytes);
27128        #[allow(clippy::absurd_extreme_comparisons)]
27129        #[allow(unused_comparisons)]
27130        if __tmp.remaining() < Self::ENCODED_LEN {
27131            panic!(
27132                "buffer is too small (need {} bytes, but got {})",
27133                Self::ENCODED_LEN,
27134                __tmp.remaining(),
27135            )
27136        }
27137        __tmp.put_u32_le(self.time_boot_ms);
27138        __tmp.put_f32_le(self.press_abs);
27139        __tmp.put_f32_le(self.press_diff);
27140        __tmp.put_i16_le(self.temperature);
27141        if matches!(version, MavlinkVersion::V2) {
27142            __tmp.put_i16_le(self.temperature_press_diff);
27143            let len = __tmp.len();
27144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27145        } else {
27146            __tmp.len()
27147        }
27148    }
27149}
27150#[doc = "Barometer readings for 2nd barometer."]
27151#[doc = ""]
27152#[doc = "ID: 137"]
27153#[derive(Debug, Clone, PartialEq)]
27154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27156#[cfg_attr(feature = "ts", derive(TS))]
27157#[cfg_attr(feature = "ts", ts(export))]
27158pub struct SCALED_PRESSURE2_DATA {
27159    #[doc = "Timestamp (time since system boot)."]
27160    pub time_boot_ms: u32,
27161    #[doc = "Absolute pressure"]
27162    pub press_abs: f32,
27163    #[doc = "Differential pressure"]
27164    pub press_diff: f32,
27165    #[doc = "Absolute pressure temperature"]
27166    pub temperature: i16,
27167    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27168    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27169    pub temperature_press_diff: i16,
27170}
27171impl SCALED_PRESSURE2_DATA {
27172    pub const ENCODED_LEN: usize = 16usize;
27173    pub const DEFAULT: Self = Self {
27174        time_boot_ms: 0_u32,
27175        press_abs: 0.0_f32,
27176        press_diff: 0.0_f32,
27177        temperature: 0_i16,
27178        temperature_press_diff: 0_i16,
27179    };
27180    #[cfg(feature = "arbitrary")]
27181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27182        use arbitrary::{Arbitrary, Unstructured};
27183        let mut buf = [0u8; 1024];
27184        rng.fill_bytes(&mut buf);
27185        let mut unstructured = Unstructured::new(&buf);
27186        Self::arbitrary(&mut unstructured).unwrap_or_default()
27187    }
27188}
27189impl Default for SCALED_PRESSURE2_DATA {
27190    fn default() -> Self {
27191        Self::DEFAULT.clone()
27192    }
27193}
27194impl MessageData for SCALED_PRESSURE2_DATA {
27195    type Message = MavMessage;
27196    const ID: u32 = 137u32;
27197    const NAME: &'static str = "SCALED_PRESSURE2";
27198    const EXTRA_CRC: u8 = 195u8;
27199    const ENCODED_LEN: usize = 16usize;
27200    fn deser(
27201        _version: MavlinkVersion,
27202        __input: &[u8],
27203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27204        let avail_len = __input.len();
27205        let mut payload_buf = [0; Self::ENCODED_LEN];
27206        let mut buf = if avail_len < Self::ENCODED_LEN {
27207            payload_buf[0..avail_len].copy_from_slice(__input);
27208            Bytes::new(&payload_buf)
27209        } else {
27210            Bytes::new(__input)
27211        };
27212        let mut __struct = Self::default();
27213        __struct.time_boot_ms = buf.get_u32_le()?;
27214        __struct.press_abs = buf.get_f32_le()?;
27215        __struct.press_diff = buf.get_f32_le()?;
27216        __struct.temperature = buf.get_i16_le()?;
27217        __struct.temperature_press_diff = buf.get_i16_le()?;
27218        Ok(__struct)
27219    }
27220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27221        let mut __tmp = BytesMut::new(bytes);
27222        #[allow(clippy::absurd_extreme_comparisons)]
27223        #[allow(unused_comparisons)]
27224        if __tmp.remaining() < Self::ENCODED_LEN {
27225            panic!(
27226                "buffer is too small (need {} bytes, but got {})",
27227                Self::ENCODED_LEN,
27228                __tmp.remaining(),
27229            )
27230        }
27231        __tmp.put_u32_le(self.time_boot_ms);
27232        __tmp.put_f32_le(self.press_abs);
27233        __tmp.put_f32_le(self.press_diff);
27234        __tmp.put_i16_le(self.temperature);
27235        if matches!(version, MavlinkVersion::V2) {
27236            __tmp.put_i16_le(self.temperature_press_diff);
27237            let len = __tmp.len();
27238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27239        } else {
27240            __tmp.len()
27241        }
27242    }
27243}
27244#[doc = "Barometer readings for 3rd barometer."]
27245#[doc = ""]
27246#[doc = "ID: 143"]
27247#[derive(Debug, Clone, PartialEq)]
27248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27250#[cfg_attr(feature = "ts", derive(TS))]
27251#[cfg_attr(feature = "ts", ts(export))]
27252pub struct SCALED_PRESSURE3_DATA {
27253    #[doc = "Timestamp (time since system boot)."]
27254    pub time_boot_ms: u32,
27255    #[doc = "Absolute pressure"]
27256    pub press_abs: f32,
27257    #[doc = "Differential pressure"]
27258    pub press_diff: f32,
27259    #[doc = "Absolute pressure temperature"]
27260    pub temperature: i16,
27261    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27262    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27263    pub temperature_press_diff: i16,
27264}
27265impl SCALED_PRESSURE3_DATA {
27266    pub const ENCODED_LEN: usize = 16usize;
27267    pub const DEFAULT: Self = Self {
27268        time_boot_ms: 0_u32,
27269        press_abs: 0.0_f32,
27270        press_diff: 0.0_f32,
27271        temperature: 0_i16,
27272        temperature_press_diff: 0_i16,
27273    };
27274    #[cfg(feature = "arbitrary")]
27275    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27276        use arbitrary::{Arbitrary, Unstructured};
27277        let mut buf = [0u8; 1024];
27278        rng.fill_bytes(&mut buf);
27279        let mut unstructured = Unstructured::new(&buf);
27280        Self::arbitrary(&mut unstructured).unwrap_or_default()
27281    }
27282}
27283impl Default for SCALED_PRESSURE3_DATA {
27284    fn default() -> Self {
27285        Self::DEFAULT.clone()
27286    }
27287}
27288impl MessageData for SCALED_PRESSURE3_DATA {
27289    type Message = MavMessage;
27290    const ID: u32 = 143u32;
27291    const NAME: &'static str = "SCALED_PRESSURE3";
27292    const EXTRA_CRC: u8 = 131u8;
27293    const ENCODED_LEN: usize = 16usize;
27294    fn deser(
27295        _version: MavlinkVersion,
27296        __input: &[u8],
27297    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27298        let avail_len = __input.len();
27299        let mut payload_buf = [0; Self::ENCODED_LEN];
27300        let mut buf = if avail_len < Self::ENCODED_LEN {
27301            payload_buf[0..avail_len].copy_from_slice(__input);
27302            Bytes::new(&payload_buf)
27303        } else {
27304            Bytes::new(__input)
27305        };
27306        let mut __struct = Self::default();
27307        __struct.time_boot_ms = buf.get_u32_le()?;
27308        __struct.press_abs = buf.get_f32_le()?;
27309        __struct.press_diff = buf.get_f32_le()?;
27310        __struct.temperature = buf.get_i16_le()?;
27311        __struct.temperature_press_diff = buf.get_i16_le()?;
27312        Ok(__struct)
27313    }
27314    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27315        let mut __tmp = BytesMut::new(bytes);
27316        #[allow(clippy::absurd_extreme_comparisons)]
27317        #[allow(unused_comparisons)]
27318        if __tmp.remaining() < Self::ENCODED_LEN {
27319            panic!(
27320                "buffer is too small (need {} bytes, but got {})",
27321                Self::ENCODED_LEN,
27322                __tmp.remaining(),
27323            )
27324        }
27325        __tmp.put_u32_le(self.time_boot_ms);
27326        __tmp.put_f32_le(self.press_abs);
27327        __tmp.put_f32_le(self.press_diff);
27328        __tmp.put_i16_le(self.temperature);
27329        if matches!(version, MavlinkVersion::V2) {
27330            __tmp.put_i16_le(self.temperature_press_diff);
27331            let len = __tmp.len();
27332            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27333        } else {
27334            __tmp.len()
27335        }
27336    }
27337}
27338#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27339#[doc = ""]
27340#[doc = "ID: 126"]
27341#[derive(Debug, Clone, PartialEq)]
27342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27344#[cfg_attr(feature = "ts", derive(TS))]
27345#[cfg_attr(feature = "ts", ts(export))]
27346pub struct SERIAL_CONTROL_DATA {
27347    #[doc = "Baudrate of transfer. Zero means no change."]
27348    pub baudrate: u32,
27349    #[doc = "Timeout for reply data"]
27350    pub timeout: u16,
27351    #[doc = "Serial control device type."]
27352    pub device: SerialControlDev,
27353    #[doc = "Bitmap of serial control flags."]
27354    pub flags: SerialControlFlag,
27355    #[doc = "how many bytes in this transfer"]
27356    pub count: u8,
27357    #[doc = "serial data"]
27358    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27359    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27360    pub data: [u8; 70],
27361    #[doc = "System ID"]
27362    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27363    pub target_system: u8,
27364    #[doc = "Component ID"]
27365    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27366    pub target_component: u8,
27367}
27368impl SERIAL_CONTROL_DATA {
27369    pub const ENCODED_LEN: usize = 81usize;
27370    pub const DEFAULT: Self = Self {
27371        baudrate: 0_u32,
27372        timeout: 0_u16,
27373        device: SerialControlDev::DEFAULT,
27374        flags: SerialControlFlag::DEFAULT,
27375        count: 0_u8,
27376        data: [0_u8; 70usize],
27377        target_system: 0_u8,
27378        target_component: 0_u8,
27379    };
27380    #[cfg(feature = "arbitrary")]
27381    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27382        use arbitrary::{Arbitrary, Unstructured};
27383        let mut buf = [0u8; 1024];
27384        rng.fill_bytes(&mut buf);
27385        let mut unstructured = Unstructured::new(&buf);
27386        Self::arbitrary(&mut unstructured).unwrap_or_default()
27387    }
27388}
27389impl Default for SERIAL_CONTROL_DATA {
27390    fn default() -> Self {
27391        Self::DEFAULT.clone()
27392    }
27393}
27394impl MessageData for SERIAL_CONTROL_DATA {
27395    type Message = MavMessage;
27396    const ID: u32 = 126u32;
27397    const NAME: &'static str = "SERIAL_CONTROL";
27398    const EXTRA_CRC: u8 = 220u8;
27399    const ENCODED_LEN: usize = 81usize;
27400    fn deser(
27401        _version: MavlinkVersion,
27402        __input: &[u8],
27403    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27404        let avail_len = __input.len();
27405        let mut payload_buf = [0; Self::ENCODED_LEN];
27406        let mut buf = if avail_len < Self::ENCODED_LEN {
27407            payload_buf[0..avail_len].copy_from_slice(__input);
27408            Bytes::new(&payload_buf)
27409        } else {
27410            Bytes::new(__input)
27411        };
27412        let mut __struct = Self::default();
27413        __struct.baudrate = buf.get_u32_le()?;
27414        __struct.timeout = buf.get_u16_le()?;
27415        let tmp = buf.get_u8()?;
27416        __struct.device =
27417            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27418                enum_type: "SerialControlDev",
27419                value: tmp as u64,
27420            })?;
27421        let tmp = buf.get_u8()?;
27422        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
27423            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27424                flag_type: "SerialControlFlag",
27425                value: tmp as u64,
27426            })?;
27427        __struct.count = buf.get_u8()?;
27428        for v in &mut __struct.data {
27429            let val = buf.get_u8()?;
27430            *v = val;
27431        }
27432        __struct.target_system = buf.get_u8()?;
27433        __struct.target_component = buf.get_u8()?;
27434        Ok(__struct)
27435    }
27436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27437        let mut __tmp = BytesMut::new(bytes);
27438        #[allow(clippy::absurd_extreme_comparisons)]
27439        #[allow(unused_comparisons)]
27440        if __tmp.remaining() < Self::ENCODED_LEN {
27441            panic!(
27442                "buffer is too small (need {} bytes, but got {})",
27443                Self::ENCODED_LEN,
27444                __tmp.remaining(),
27445            )
27446        }
27447        __tmp.put_u32_le(self.baudrate);
27448        __tmp.put_u16_le(self.timeout);
27449        __tmp.put_u8(self.device as u8);
27450        __tmp.put_u8(self.flags.bits() as u8);
27451        __tmp.put_u8(self.count);
27452        for val in &self.data {
27453            __tmp.put_u8(*val);
27454        }
27455        if matches!(version, MavlinkVersion::V2) {
27456            __tmp.put_u8(self.target_system);
27457            __tmp.put_u8(self.target_component);
27458            let len = __tmp.len();
27459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27460        } else {
27461            __tmp.len()
27462        }
27463    }
27464}
27465#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27466#[doc = ""]
27467#[doc = "ID: 36"]
27468#[derive(Debug, Clone, PartialEq)]
27469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27471#[cfg_attr(feature = "ts", derive(TS))]
27472#[cfg_attr(feature = "ts", ts(export))]
27473pub struct SERVO_OUTPUT_RAW_DATA {
27474    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27475    pub time_usec: u32,
27476    #[doc = "Servo output 1 value"]
27477    pub servo1_raw: u16,
27478    #[doc = "Servo output 2 value"]
27479    pub servo2_raw: u16,
27480    #[doc = "Servo output 3 value"]
27481    pub servo3_raw: u16,
27482    #[doc = "Servo output 4 value"]
27483    pub servo4_raw: u16,
27484    #[doc = "Servo output 5 value"]
27485    pub servo5_raw: u16,
27486    #[doc = "Servo output 6 value"]
27487    pub servo6_raw: u16,
27488    #[doc = "Servo output 7 value"]
27489    pub servo7_raw: u16,
27490    #[doc = "Servo output 8 value"]
27491    pub servo8_raw: u16,
27492    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27493    pub port: u8,
27494    #[doc = "Servo output 9 value"]
27495    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27496    pub servo9_raw: u16,
27497    #[doc = "Servo output 10 value"]
27498    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27499    pub servo10_raw: u16,
27500    #[doc = "Servo output 11 value"]
27501    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27502    pub servo11_raw: u16,
27503    #[doc = "Servo output 12 value"]
27504    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27505    pub servo12_raw: u16,
27506    #[doc = "Servo output 13 value"]
27507    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27508    pub servo13_raw: u16,
27509    #[doc = "Servo output 14 value"]
27510    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27511    pub servo14_raw: u16,
27512    #[doc = "Servo output 15 value"]
27513    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27514    pub servo15_raw: u16,
27515    #[doc = "Servo output 16 value"]
27516    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27517    pub servo16_raw: u16,
27518}
27519impl SERVO_OUTPUT_RAW_DATA {
27520    pub const ENCODED_LEN: usize = 37usize;
27521    pub const DEFAULT: Self = Self {
27522        time_usec: 0_u32,
27523        servo1_raw: 0_u16,
27524        servo2_raw: 0_u16,
27525        servo3_raw: 0_u16,
27526        servo4_raw: 0_u16,
27527        servo5_raw: 0_u16,
27528        servo6_raw: 0_u16,
27529        servo7_raw: 0_u16,
27530        servo8_raw: 0_u16,
27531        port: 0_u8,
27532        servo9_raw: 0_u16,
27533        servo10_raw: 0_u16,
27534        servo11_raw: 0_u16,
27535        servo12_raw: 0_u16,
27536        servo13_raw: 0_u16,
27537        servo14_raw: 0_u16,
27538        servo15_raw: 0_u16,
27539        servo16_raw: 0_u16,
27540    };
27541    #[cfg(feature = "arbitrary")]
27542    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27543        use arbitrary::{Arbitrary, Unstructured};
27544        let mut buf = [0u8; 1024];
27545        rng.fill_bytes(&mut buf);
27546        let mut unstructured = Unstructured::new(&buf);
27547        Self::arbitrary(&mut unstructured).unwrap_or_default()
27548    }
27549}
27550impl Default for SERVO_OUTPUT_RAW_DATA {
27551    fn default() -> Self {
27552        Self::DEFAULT.clone()
27553    }
27554}
27555impl MessageData for SERVO_OUTPUT_RAW_DATA {
27556    type Message = MavMessage;
27557    const ID: u32 = 36u32;
27558    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27559    const EXTRA_CRC: u8 = 222u8;
27560    const ENCODED_LEN: usize = 37usize;
27561    fn deser(
27562        _version: MavlinkVersion,
27563        __input: &[u8],
27564    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27565        let avail_len = __input.len();
27566        let mut payload_buf = [0; Self::ENCODED_LEN];
27567        let mut buf = if avail_len < Self::ENCODED_LEN {
27568            payload_buf[0..avail_len].copy_from_slice(__input);
27569            Bytes::new(&payload_buf)
27570        } else {
27571            Bytes::new(__input)
27572        };
27573        let mut __struct = Self::default();
27574        __struct.time_usec = buf.get_u32_le()?;
27575        __struct.servo1_raw = buf.get_u16_le()?;
27576        __struct.servo2_raw = buf.get_u16_le()?;
27577        __struct.servo3_raw = buf.get_u16_le()?;
27578        __struct.servo4_raw = buf.get_u16_le()?;
27579        __struct.servo5_raw = buf.get_u16_le()?;
27580        __struct.servo6_raw = buf.get_u16_le()?;
27581        __struct.servo7_raw = buf.get_u16_le()?;
27582        __struct.servo8_raw = buf.get_u16_le()?;
27583        __struct.port = buf.get_u8()?;
27584        __struct.servo9_raw = buf.get_u16_le()?;
27585        __struct.servo10_raw = buf.get_u16_le()?;
27586        __struct.servo11_raw = buf.get_u16_le()?;
27587        __struct.servo12_raw = buf.get_u16_le()?;
27588        __struct.servo13_raw = buf.get_u16_le()?;
27589        __struct.servo14_raw = buf.get_u16_le()?;
27590        __struct.servo15_raw = buf.get_u16_le()?;
27591        __struct.servo16_raw = buf.get_u16_le()?;
27592        Ok(__struct)
27593    }
27594    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27595        let mut __tmp = BytesMut::new(bytes);
27596        #[allow(clippy::absurd_extreme_comparisons)]
27597        #[allow(unused_comparisons)]
27598        if __tmp.remaining() < Self::ENCODED_LEN {
27599            panic!(
27600                "buffer is too small (need {} bytes, but got {})",
27601                Self::ENCODED_LEN,
27602                __tmp.remaining(),
27603            )
27604        }
27605        __tmp.put_u32_le(self.time_usec);
27606        __tmp.put_u16_le(self.servo1_raw);
27607        __tmp.put_u16_le(self.servo2_raw);
27608        __tmp.put_u16_le(self.servo3_raw);
27609        __tmp.put_u16_le(self.servo4_raw);
27610        __tmp.put_u16_le(self.servo5_raw);
27611        __tmp.put_u16_le(self.servo6_raw);
27612        __tmp.put_u16_le(self.servo7_raw);
27613        __tmp.put_u16_le(self.servo8_raw);
27614        __tmp.put_u8(self.port);
27615        if matches!(version, MavlinkVersion::V2) {
27616            __tmp.put_u16_le(self.servo9_raw);
27617            __tmp.put_u16_le(self.servo10_raw);
27618            __tmp.put_u16_le(self.servo11_raw);
27619            __tmp.put_u16_le(self.servo12_raw);
27620            __tmp.put_u16_le(self.servo13_raw);
27621            __tmp.put_u16_le(self.servo14_raw);
27622            __tmp.put_u16_le(self.servo15_raw);
27623            __tmp.put_u16_le(self.servo16_raw);
27624            let len = __tmp.len();
27625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27626        } else {
27627            __tmp.len()
27628        }
27629    }
27630}
27631#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27632#[doc = ""]
27633#[doc = "ID: 256"]
27634#[derive(Debug, Clone, PartialEq)]
27635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27637#[cfg_attr(feature = "ts", derive(TS))]
27638#[cfg_attr(feature = "ts", ts(export))]
27639pub struct SETUP_SIGNING_DATA {
27640    #[doc = "initial timestamp"]
27641    pub initial_timestamp: u64,
27642    #[doc = "system id of the target"]
27643    pub target_system: u8,
27644    #[doc = "component ID of the target"]
27645    pub target_component: u8,
27646    #[doc = "signing key"]
27647    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27648    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27649    pub secret_key: [u8; 32],
27650}
27651impl SETUP_SIGNING_DATA {
27652    pub const ENCODED_LEN: usize = 42usize;
27653    pub const DEFAULT: Self = Self {
27654        initial_timestamp: 0_u64,
27655        target_system: 0_u8,
27656        target_component: 0_u8,
27657        secret_key: [0_u8; 32usize],
27658    };
27659    #[cfg(feature = "arbitrary")]
27660    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27661        use arbitrary::{Arbitrary, Unstructured};
27662        let mut buf = [0u8; 1024];
27663        rng.fill_bytes(&mut buf);
27664        let mut unstructured = Unstructured::new(&buf);
27665        Self::arbitrary(&mut unstructured).unwrap_or_default()
27666    }
27667}
27668impl Default for SETUP_SIGNING_DATA {
27669    fn default() -> Self {
27670        Self::DEFAULT.clone()
27671    }
27672}
27673impl MessageData for SETUP_SIGNING_DATA {
27674    type Message = MavMessage;
27675    const ID: u32 = 256u32;
27676    const NAME: &'static str = "SETUP_SIGNING";
27677    const EXTRA_CRC: u8 = 71u8;
27678    const ENCODED_LEN: usize = 42usize;
27679    fn deser(
27680        _version: MavlinkVersion,
27681        __input: &[u8],
27682    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27683        let avail_len = __input.len();
27684        let mut payload_buf = [0; Self::ENCODED_LEN];
27685        let mut buf = if avail_len < Self::ENCODED_LEN {
27686            payload_buf[0..avail_len].copy_from_slice(__input);
27687            Bytes::new(&payload_buf)
27688        } else {
27689            Bytes::new(__input)
27690        };
27691        let mut __struct = Self::default();
27692        __struct.initial_timestamp = buf.get_u64_le()?;
27693        __struct.target_system = buf.get_u8()?;
27694        __struct.target_component = buf.get_u8()?;
27695        for v in &mut __struct.secret_key {
27696            let val = buf.get_u8()?;
27697            *v = val;
27698        }
27699        Ok(__struct)
27700    }
27701    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27702        let mut __tmp = BytesMut::new(bytes);
27703        #[allow(clippy::absurd_extreme_comparisons)]
27704        #[allow(unused_comparisons)]
27705        if __tmp.remaining() < Self::ENCODED_LEN {
27706            panic!(
27707                "buffer is too small (need {} bytes, but got {})",
27708                Self::ENCODED_LEN,
27709                __tmp.remaining(),
27710            )
27711        }
27712        __tmp.put_u64_le(self.initial_timestamp);
27713        __tmp.put_u8(self.target_system);
27714        __tmp.put_u8(self.target_component);
27715        for val in &self.secret_key {
27716            __tmp.put_u8(*val);
27717        }
27718        if matches!(version, MavlinkVersion::V2) {
27719            let len = __tmp.len();
27720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27721        } else {
27722            __tmp.len()
27723        }
27724    }
27725}
27726#[doc = "Set the vehicle attitude and body angular rates."]
27727#[doc = ""]
27728#[doc = "ID: 139"]
27729#[derive(Debug, Clone, PartialEq)]
27730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27732#[cfg_attr(feature = "ts", derive(TS))]
27733#[cfg_attr(feature = "ts", ts(export))]
27734pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27735    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27736    pub time_usec: u64,
27737    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27738    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27739    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27740    pub controls: [f32; 8],
27741    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27742    pub group_mlx: u8,
27743    #[doc = "System ID"]
27744    pub target_system: u8,
27745    #[doc = "Component ID"]
27746    pub target_component: u8,
27747}
27748impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27749    pub const ENCODED_LEN: usize = 43usize;
27750    pub const DEFAULT: Self = Self {
27751        time_usec: 0_u64,
27752        controls: [0.0_f32; 8usize],
27753        group_mlx: 0_u8,
27754        target_system: 0_u8,
27755        target_component: 0_u8,
27756    };
27757    #[cfg(feature = "arbitrary")]
27758    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27759        use arbitrary::{Arbitrary, Unstructured};
27760        let mut buf = [0u8; 1024];
27761        rng.fill_bytes(&mut buf);
27762        let mut unstructured = Unstructured::new(&buf);
27763        Self::arbitrary(&mut unstructured).unwrap_or_default()
27764    }
27765}
27766impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27767    fn default() -> Self {
27768        Self::DEFAULT.clone()
27769    }
27770}
27771impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27772    type Message = MavMessage;
27773    const ID: u32 = 139u32;
27774    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27775    const EXTRA_CRC: u8 = 168u8;
27776    const ENCODED_LEN: usize = 43usize;
27777    fn deser(
27778        _version: MavlinkVersion,
27779        __input: &[u8],
27780    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27781        let avail_len = __input.len();
27782        let mut payload_buf = [0; Self::ENCODED_LEN];
27783        let mut buf = if avail_len < Self::ENCODED_LEN {
27784            payload_buf[0..avail_len].copy_from_slice(__input);
27785            Bytes::new(&payload_buf)
27786        } else {
27787            Bytes::new(__input)
27788        };
27789        let mut __struct = Self::default();
27790        __struct.time_usec = buf.get_u64_le()?;
27791        for v in &mut __struct.controls {
27792            let val = buf.get_f32_le()?;
27793            *v = val;
27794        }
27795        __struct.group_mlx = buf.get_u8()?;
27796        __struct.target_system = buf.get_u8()?;
27797        __struct.target_component = buf.get_u8()?;
27798        Ok(__struct)
27799    }
27800    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27801        let mut __tmp = BytesMut::new(bytes);
27802        #[allow(clippy::absurd_extreme_comparisons)]
27803        #[allow(unused_comparisons)]
27804        if __tmp.remaining() < Self::ENCODED_LEN {
27805            panic!(
27806                "buffer is too small (need {} bytes, but got {})",
27807                Self::ENCODED_LEN,
27808                __tmp.remaining(),
27809            )
27810        }
27811        __tmp.put_u64_le(self.time_usec);
27812        for val in &self.controls {
27813            __tmp.put_f32_le(*val);
27814        }
27815        __tmp.put_u8(self.group_mlx);
27816        __tmp.put_u8(self.target_system);
27817        __tmp.put_u8(self.target_component);
27818        if matches!(version, MavlinkVersion::V2) {
27819            let len = __tmp.len();
27820            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27821        } else {
27822            __tmp.len()
27823        }
27824    }
27825}
27826#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27827#[doc = ""]
27828#[doc = "ID: 82"]
27829#[derive(Debug, Clone, PartialEq)]
27830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27832#[cfg_attr(feature = "ts", derive(TS))]
27833#[cfg_attr(feature = "ts", ts(export))]
27834pub struct SET_ATTITUDE_TARGET_DATA {
27835    #[doc = "Timestamp (time since system boot)."]
27836    pub time_boot_ms: u32,
27837    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27838    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27839    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27840    pub q: [f32; 4],
27841    #[doc = "Body roll rate"]
27842    pub body_roll_rate: f32,
27843    #[doc = "Body pitch rate"]
27844    pub body_pitch_rate: f32,
27845    #[doc = "Body yaw rate"]
27846    pub body_yaw_rate: f32,
27847    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27848    pub thrust: f32,
27849    #[doc = "System ID"]
27850    pub target_system: u8,
27851    #[doc = "Component ID"]
27852    pub target_component: u8,
27853    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27854    pub type_mask: AttitudeTargetTypemask,
27855    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27856    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27857    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27858    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27859    pub thrust_body: [f32; 3],
27860}
27861impl SET_ATTITUDE_TARGET_DATA {
27862    pub const ENCODED_LEN: usize = 51usize;
27863    pub const DEFAULT: Self = Self {
27864        time_boot_ms: 0_u32,
27865        q: [0.0_f32; 4usize],
27866        body_roll_rate: 0.0_f32,
27867        body_pitch_rate: 0.0_f32,
27868        body_yaw_rate: 0.0_f32,
27869        thrust: 0.0_f32,
27870        target_system: 0_u8,
27871        target_component: 0_u8,
27872        type_mask: AttitudeTargetTypemask::DEFAULT,
27873        thrust_body: [0.0_f32; 3usize],
27874    };
27875    #[cfg(feature = "arbitrary")]
27876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27877        use arbitrary::{Arbitrary, Unstructured};
27878        let mut buf = [0u8; 1024];
27879        rng.fill_bytes(&mut buf);
27880        let mut unstructured = Unstructured::new(&buf);
27881        Self::arbitrary(&mut unstructured).unwrap_or_default()
27882    }
27883}
27884impl Default for SET_ATTITUDE_TARGET_DATA {
27885    fn default() -> Self {
27886        Self::DEFAULT.clone()
27887    }
27888}
27889impl MessageData for SET_ATTITUDE_TARGET_DATA {
27890    type Message = MavMessage;
27891    const ID: u32 = 82u32;
27892    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27893    const EXTRA_CRC: u8 = 49u8;
27894    const ENCODED_LEN: usize = 51usize;
27895    fn deser(
27896        _version: MavlinkVersion,
27897        __input: &[u8],
27898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27899        let avail_len = __input.len();
27900        let mut payload_buf = [0; Self::ENCODED_LEN];
27901        let mut buf = if avail_len < Self::ENCODED_LEN {
27902            payload_buf[0..avail_len].copy_from_slice(__input);
27903            Bytes::new(&payload_buf)
27904        } else {
27905            Bytes::new(__input)
27906        };
27907        let mut __struct = Self::default();
27908        __struct.time_boot_ms = buf.get_u32_le()?;
27909        for v in &mut __struct.q {
27910            let val = buf.get_f32_le()?;
27911            *v = val;
27912        }
27913        __struct.body_roll_rate = buf.get_f32_le()?;
27914        __struct.body_pitch_rate = buf.get_f32_le()?;
27915        __struct.body_yaw_rate = buf.get_f32_le()?;
27916        __struct.thrust = buf.get_f32_le()?;
27917        __struct.target_system = buf.get_u8()?;
27918        __struct.target_component = buf.get_u8()?;
27919        let tmp = buf.get_u8()?;
27920        __struct.type_mask =
27921            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
27922                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27923                    flag_type: "AttitudeTargetTypemask",
27924                    value: tmp as u64,
27925                })?;
27926        for v in &mut __struct.thrust_body {
27927            let val = buf.get_f32_le()?;
27928            *v = val;
27929        }
27930        Ok(__struct)
27931    }
27932    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27933        let mut __tmp = BytesMut::new(bytes);
27934        #[allow(clippy::absurd_extreme_comparisons)]
27935        #[allow(unused_comparisons)]
27936        if __tmp.remaining() < Self::ENCODED_LEN {
27937            panic!(
27938                "buffer is too small (need {} bytes, but got {})",
27939                Self::ENCODED_LEN,
27940                __tmp.remaining(),
27941            )
27942        }
27943        __tmp.put_u32_le(self.time_boot_ms);
27944        for val in &self.q {
27945            __tmp.put_f32_le(*val);
27946        }
27947        __tmp.put_f32_le(self.body_roll_rate);
27948        __tmp.put_f32_le(self.body_pitch_rate);
27949        __tmp.put_f32_le(self.body_yaw_rate);
27950        __tmp.put_f32_le(self.thrust);
27951        __tmp.put_u8(self.target_system);
27952        __tmp.put_u8(self.target_component);
27953        __tmp.put_u8(self.type_mask.bits() as u8);
27954        if matches!(version, MavlinkVersion::V2) {
27955            for val in &self.thrust_body {
27956                __tmp.put_f32_le(*val);
27957            }
27958            let len = __tmp.len();
27959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27960        } else {
27961            __tmp.len()
27962        }
27963    }
27964}
27965#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
27966#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
27967#[doc = ""]
27968#[doc = "ID: 48"]
27969#[derive(Debug, Clone, PartialEq)]
27970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27972#[cfg_attr(feature = "ts", derive(TS))]
27973#[cfg_attr(feature = "ts", ts(export))]
27974pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
27975    #[doc = "Latitude (WGS84)"]
27976    pub latitude: i32,
27977    #[doc = "Longitude (WGS84)"]
27978    pub longitude: i32,
27979    #[doc = "Altitude (MSL). Positive for up."]
27980    pub altitude: i32,
27981    #[doc = "System ID"]
27982    pub target_system: u8,
27983    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27984    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27985    pub time_usec: u64,
27986}
27987impl SET_GPS_GLOBAL_ORIGIN_DATA {
27988    pub const ENCODED_LEN: usize = 21usize;
27989    pub const DEFAULT: Self = Self {
27990        latitude: 0_i32,
27991        longitude: 0_i32,
27992        altitude: 0_i32,
27993        target_system: 0_u8,
27994        time_usec: 0_u64,
27995    };
27996    #[cfg(feature = "arbitrary")]
27997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27998        use arbitrary::{Arbitrary, Unstructured};
27999        let mut buf = [0u8; 1024];
28000        rng.fill_bytes(&mut buf);
28001        let mut unstructured = Unstructured::new(&buf);
28002        Self::arbitrary(&mut unstructured).unwrap_or_default()
28003    }
28004}
28005impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28006    fn default() -> Self {
28007        Self::DEFAULT.clone()
28008    }
28009}
28010impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28011    type Message = MavMessage;
28012    const ID: u32 = 48u32;
28013    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28014    const EXTRA_CRC: u8 = 41u8;
28015    const ENCODED_LEN: usize = 21usize;
28016    fn deser(
28017        _version: MavlinkVersion,
28018        __input: &[u8],
28019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28020        let avail_len = __input.len();
28021        let mut payload_buf = [0; Self::ENCODED_LEN];
28022        let mut buf = if avail_len < Self::ENCODED_LEN {
28023            payload_buf[0..avail_len].copy_from_slice(__input);
28024            Bytes::new(&payload_buf)
28025        } else {
28026            Bytes::new(__input)
28027        };
28028        let mut __struct = Self::default();
28029        __struct.latitude = buf.get_i32_le()?;
28030        __struct.longitude = buf.get_i32_le()?;
28031        __struct.altitude = buf.get_i32_le()?;
28032        __struct.target_system = buf.get_u8()?;
28033        __struct.time_usec = buf.get_u64_le()?;
28034        Ok(__struct)
28035    }
28036    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28037        let mut __tmp = BytesMut::new(bytes);
28038        #[allow(clippy::absurd_extreme_comparisons)]
28039        #[allow(unused_comparisons)]
28040        if __tmp.remaining() < Self::ENCODED_LEN {
28041            panic!(
28042                "buffer is too small (need {} bytes, but got {})",
28043                Self::ENCODED_LEN,
28044                __tmp.remaining(),
28045            )
28046        }
28047        __tmp.put_i32_le(self.latitude);
28048        __tmp.put_i32_le(self.longitude);
28049        __tmp.put_i32_le(self.altitude);
28050        __tmp.put_u8(self.target_system);
28051        if matches!(version, MavlinkVersion::V2) {
28052            __tmp.put_u64_le(self.time_usec);
28053            let len = __tmp.len();
28054            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28055        } else {
28056            __tmp.len()
28057        }
28058    }
28059}
28060#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28061#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28062#[doc = ""]
28063#[doc = "ID: 243"]
28064#[derive(Debug, Clone, PartialEq)]
28065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28067#[cfg_attr(feature = "ts", derive(TS))]
28068#[cfg_attr(feature = "ts", ts(export))]
28069pub struct SET_HOME_POSITION_DATA {
28070    #[doc = "Latitude (WGS84)"]
28071    pub latitude: i32,
28072    #[doc = "Longitude (WGS84)"]
28073    pub longitude: i32,
28074    #[doc = "Altitude (MSL). Positive for up."]
28075    pub altitude: i32,
28076    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28077    pub x: f32,
28078    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28079    pub y: f32,
28080    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28081    pub z: f32,
28082    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28083    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28084    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28085    pub q: [f32; 4],
28086    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28087    pub approach_x: f32,
28088    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28089    pub approach_y: f32,
28090    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28091    pub approach_z: f32,
28092    #[doc = "System ID."]
28093    pub target_system: u8,
28094    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28095    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28096    pub time_usec: u64,
28097}
28098impl SET_HOME_POSITION_DATA {
28099    pub const ENCODED_LEN: usize = 61usize;
28100    pub const DEFAULT: Self = Self {
28101        latitude: 0_i32,
28102        longitude: 0_i32,
28103        altitude: 0_i32,
28104        x: 0.0_f32,
28105        y: 0.0_f32,
28106        z: 0.0_f32,
28107        q: [0.0_f32; 4usize],
28108        approach_x: 0.0_f32,
28109        approach_y: 0.0_f32,
28110        approach_z: 0.0_f32,
28111        target_system: 0_u8,
28112        time_usec: 0_u64,
28113    };
28114    #[cfg(feature = "arbitrary")]
28115    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28116        use arbitrary::{Arbitrary, Unstructured};
28117        let mut buf = [0u8; 1024];
28118        rng.fill_bytes(&mut buf);
28119        let mut unstructured = Unstructured::new(&buf);
28120        Self::arbitrary(&mut unstructured).unwrap_or_default()
28121    }
28122}
28123impl Default for SET_HOME_POSITION_DATA {
28124    fn default() -> Self {
28125        Self::DEFAULT.clone()
28126    }
28127}
28128impl MessageData for SET_HOME_POSITION_DATA {
28129    type Message = MavMessage;
28130    const ID: u32 = 243u32;
28131    const NAME: &'static str = "SET_HOME_POSITION";
28132    const EXTRA_CRC: u8 = 85u8;
28133    const ENCODED_LEN: usize = 61usize;
28134    fn deser(
28135        _version: MavlinkVersion,
28136        __input: &[u8],
28137    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28138        let avail_len = __input.len();
28139        let mut payload_buf = [0; Self::ENCODED_LEN];
28140        let mut buf = if avail_len < Self::ENCODED_LEN {
28141            payload_buf[0..avail_len].copy_from_slice(__input);
28142            Bytes::new(&payload_buf)
28143        } else {
28144            Bytes::new(__input)
28145        };
28146        let mut __struct = Self::default();
28147        __struct.latitude = buf.get_i32_le()?;
28148        __struct.longitude = buf.get_i32_le()?;
28149        __struct.altitude = buf.get_i32_le()?;
28150        __struct.x = buf.get_f32_le()?;
28151        __struct.y = buf.get_f32_le()?;
28152        __struct.z = buf.get_f32_le()?;
28153        for v in &mut __struct.q {
28154            let val = buf.get_f32_le()?;
28155            *v = val;
28156        }
28157        __struct.approach_x = buf.get_f32_le()?;
28158        __struct.approach_y = buf.get_f32_le()?;
28159        __struct.approach_z = buf.get_f32_le()?;
28160        __struct.target_system = buf.get_u8()?;
28161        __struct.time_usec = buf.get_u64_le()?;
28162        Ok(__struct)
28163    }
28164    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28165        let mut __tmp = BytesMut::new(bytes);
28166        #[allow(clippy::absurd_extreme_comparisons)]
28167        #[allow(unused_comparisons)]
28168        if __tmp.remaining() < Self::ENCODED_LEN {
28169            panic!(
28170                "buffer is too small (need {} bytes, but got {})",
28171                Self::ENCODED_LEN,
28172                __tmp.remaining(),
28173            )
28174        }
28175        __tmp.put_i32_le(self.latitude);
28176        __tmp.put_i32_le(self.longitude);
28177        __tmp.put_i32_le(self.altitude);
28178        __tmp.put_f32_le(self.x);
28179        __tmp.put_f32_le(self.y);
28180        __tmp.put_f32_le(self.z);
28181        for val in &self.q {
28182            __tmp.put_f32_le(*val);
28183        }
28184        __tmp.put_f32_le(self.approach_x);
28185        __tmp.put_f32_le(self.approach_y);
28186        __tmp.put_f32_le(self.approach_z);
28187        __tmp.put_u8(self.target_system);
28188        if matches!(version, MavlinkVersion::V2) {
28189            __tmp.put_u64_le(self.time_usec);
28190            let len = __tmp.len();
28191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28192        } else {
28193            __tmp.len()
28194        }
28195    }
28196}
28197#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28198#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28199#[doc = ""]
28200#[doc = "ID: 11"]
28201#[derive(Debug, Clone, PartialEq)]
28202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28204#[cfg_attr(feature = "ts", derive(TS))]
28205#[cfg_attr(feature = "ts", ts(export))]
28206pub struct SET_MODE_DATA {
28207    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28208    pub custom_mode: u32,
28209    #[doc = "The system setting the mode"]
28210    pub target_system: u8,
28211    #[doc = "The new base mode."]
28212    pub base_mode: MavMode,
28213}
28214impl SET_MODE_DATA {
28215    pub const ENCODED_LEN: usize = 6usize;
28216    pub const DEFAULT: Self = Self {
28217        custom_mode: 0_u32,
28218        target_system: 0_u8,
28219        base_mode: MavMode::DEFAULT,
28220    };
28221    #[cfg(feature = "arbitrary")]
28222    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28223        use arbitrary::{Arbitrary, Unstructured};
28224        let mut buf = [0u8; 1024];
28225        rng.fill_bytes(&mut buf);
28226        let mut unstructured = Unstructured::new(&buf);
28227        Self::arbitrary(&mut unstructured).unwrap_or_default()
28228    }
28229}
28230impl Default for SET_MODE_DATA {
28231    fn default() -> Self {
28232        Self::DEFAULT.clone()
28233    }
28234}
28235impl MessageData for SET_MODE_DATA {
28236    type Message = MavMessage;
28237    const ID: u32 = 11u32;
28238    const NAME: &'static str = "SET_MODE";
28239    const EXTRA_CRC: u8 = 89u8;
28240    const ENCODED_LEN: usize = 6usize;
28241    fn deser(
28242        _version: MavlinkVersion,
28243        __input: &[u8],
28244    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28245        let avail_len = __input.len();
28246        let mut payload_buf = [0; Self::ENCODED_LEN];
28247        let mut buf = if avail_len < Self::ENCODED_LEN {
28248            payload_buf[0..avail_len].copy_from_slice(__input);
28249            Bytes::new(&payload_buf)
28250        } else {
28251            Bytes::new(__input)
28252        };
28253        let mut __struct = Self::default();
28254        __struct.custom_mode = buf.get_u32_le()?;
28255        __struct.target_system = buf.get_u8()?;
28256        let tmp = buf.get_u8()?;
28257        __struct.base_mode =
28258            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28259                enum_type: "MavMode",
28260                value: tmp as u64,
28261            })?;
28262        Ok(__struct)
28263    }
28264    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28265        let mut __tmp = BytesMut::new(bytes);
28266        #[allow(clippy::absurd_extreme_comparisons)]
28267        #[allow(unused_comparisons)]
28268        if __tmp.remaining() < Self::ENCODED_LEN {
28269            panic!(
28270                "buffer is too small (need {} bytes, but got {})",
28271                Self::ENCODED_LEN,
28272                __tmp.remaining(),
28273            )
28274        }
28275        __tmp.put_u32_le(self.custom_mode);
28276        __tmp.put_u8(self.target_system);
28277        __tmp.put_u8(self.base_mode as u8);
28278        if matches!(version, MavlinkVersion::V2) {
28279            let len = __tmp.len();
28280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28281        } else {
28282            __tmp.len()
28283        }
28284    }
28285}
28286#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28287#[doc = ""]
28288#[doc = "ID: 86"]
28289#[derive(Debug, Clone, PartialEq)]
28290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28292#[cfg_attr(feature = "ts", derive(TS))]
28293#[cfg_attr(feature = "ts", ts(export))]
28294pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28295    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28296    pub time_boot_ms: u32,
28297    #[doc = "Latitude in WGS84 frame"]
28298    pub lat_int: i32,
28299    #[doc = "Longitude in WGS84 frame"]
28300    pub lon_int: i32,
28301    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28302    pub alt: f32,
28303    #[doc = "X velocity in NED frame"]
28304    pub vx: f32,
28305    #[doc = "Y velocity in NED frame"]
28306    pub vy: f32,
28307    #[doc = "Z velocity in NED frame"]
28308    pub vz: f32,
28309    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28310    pub afx: f32,
28311    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28312    pub afy: f32,
28313    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28314    pub afz: f32,
28315    #[doc = "yaw setpoint"]
28316    pub yaw: f32,
28317    #[doc = "yaw rate setpoint"]
28318    pub yaw_rate: f32,
28319    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28320    pub type_mask: PositionTargetTypemask,
28321    #[doc = "System ID"]
28322    pub target_system: u8,
28323    #[doc = "Component ID"]
28324    pub target_component: u8,
28325    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28326    pub coordinate_frame: MavFrame,
28327}
28328impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28329    pub const ENCODED_LEN: usize = 53usize;
28330    pub const DEFAULT: Self = Self {
28331        time_boot_ms: 0_u32,
28332        lat_int: 0_i32,
28333        lon_int: 0_i32,
28334        alt: 0.0_f32,
28335        vx: 0.0_f32,
28336        vy: 0.0_f32,
28337        vz: 0.0_f32,
28338        afx: 0.0_f32,
28339        afy: 0.0_f32,
28340        afz: 0.0_f32,
28341        yaw: 0.0_f32,
28342        yaw_rate: 0.0_f32,
28343        type_mask: PositionTargetTypemask::DEFAULT,
28344        target_system: 0_u8,
28345        target_component: 0_u8,
28346        coordinate_frame: MavFrame::DEFAULT,
28347    };
28348    #[cfg(feature = "arbitrary")]
28349    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28350        use arbitrary::{Arbitrary, Unstructured};
28351        let mut buf = [0u8; 1024];
28352        rng.fill_bytes(&mut buf);
28353        let mut unstructured = Unstructured::new(&buf);
28354        Self::arbitrary(&mut unstructured).unwrap_or_default()
28355    }
28356}
28357impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28358    fn default() -> Self {
28359        Self::DEFAULT.clone()
28360    }
28361}
28362impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28363    type Message = MavMessage;
28364    const ID: u32 = 86u32;
28365    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28366    const EXTRA_CRC: u8 = 5u8;
28367    const ENCODED_LEN: usize = 53usize;
28368    fn deser(
28369        _version: MavlinkVersion,
28370        __input: &[u8],
28371    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28372        let avail_len = __input.len();
28373        let mut payload_buf = [0; Self::ENCODED_LEN];
28374        let mut buf = if avail_len < Self::ENCODED_LEN {
28375            payload_buf[0..avail_len].copy_from_slice(__input);
28376            Bytes::new(&payload_buf)
28377        } else {
28378            Bytes::new(__input)
28379        };
28380        let mut __struct = Self::default();
28381        __struct.time_boot_ms = buf.get_u32_le()?;
28382        __struct.lat_int = buf.get_i32_le()?;
28383        __struct.lon_int = buf.get_i32_le()?;
28384        __struct.alt = buf.get_f32_le()?;
28385        __struct.vx = buf.get_f32_le()?;
28386        __struct.vy = buf.get_f32_le()?;
28387        __struct.vz = buf.get_f32_le()?;
28388        __struct.afx = buf.get_f32_le()?;
28389        __struct.afy = buf.get_f32_le()?;
28390        __struct.afz = buf.get_f32_le()?;
28391        __struct.yaw = buf.get_f32_le()?;
28392        __struct.yaw_rate = buf.get_f32_le()?;
28393        let tmp = buf.get_u16_le()?;
28394        __struct.type_mask =
28395            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28396                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28397                    flag_type: "PositionTargetTypemask",
28398                    value: tmp as u64,
28399                })?;
28400        __struct.target_system = buf.get_u8()?;
28401        __struct.target_component = buf.get_u8()?;
28402        let tmp = buf.get_u8()?;
28403        __struct.coordinate_frame =
28404            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28405                enum_type: "MavFrame",
28406                value: tmp as u64,
28407            })?;
28408        Ok(__struct)
28409    }
28410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28411        let mut __tmp = BytesMut::new(bytes);
28412        #[allow(clippy::absurd_extreme_comparisons)]
28413        #[allow(unused_comparisons)]
28414        if __tmp.remaining() < Self::ENCODED_LEN {
28415            panic!(
28416                "buffer is too small (need {} bytes, but got {})",
28417                Self::ENCODED_LEN,
28418                __tmp.remaining(),
28419            )
28420        }
28421        __tmp.put_u32_le(self.time_boot_ms);
28422        __tmp.put_i32_le(self.lat_int);
28423        __tmp.put_i32_le(self.lon_int);
28424        __tmp.put_f32_le(self.alt);
28425        __tmp.put_f32_le(self.vx);
28426        __tmp.put_f32_le(self.vy);
28427        __tmp.put_f32_le(self.vz);
28428        __tmp.put_f32_le(self.afx);
28429        __tmp.put_f32_le(self.afy);
28430        __tmp.put_f32_le(self.afz);
28431        __tmp.put_f32_le(self.yaw);
28432        __tmp.put_f32_le(self.yaw_rate);
28433        __tmp.put_u16_le(self.type_mask.bits() as u16);
28434        __tmp.put_u8(self.target_system);
28435        __tmp.put_u8(self.target_component);
28436        __tmp.put_u8(self.coordinate_frame as u8);
28437        if matches!(version, MavlinkVersion::V2) {
28438            let len = __tmp.len();
28439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28440        } else {
28441            __tmp.len()
28442        }
28443    }
28444}
28445#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28446#[doc = ""]
28447#[doc = "ID: 84"]
28448#[derive(Debug, Clone, PartialEq)]
28449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28451#[cfg_attr(feature = "ts", derive(TS))]
28452#[cfg_attr(feature = "ts", ts(export))]
28453pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28454    #[doc = "Timestamp (time since system boot)."]
28455    pub time_boot_ms: u32,
28456    #[doc = "X Position in NED frame"]
28457    pub x: f32,
28458    #[doc = "Y Position in NED frame"]
28459    pub y: f32,
28460    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28461    pub z: f32,
28462    #[doc = "X velocity in NED frame"]
28463    pub vx: f32,
28464    #[doc = "Y velocity in NED frame"]
28465    pub vy: f32,
28466    #[doc = "Z velocity in NED frame"]
28467    pub vz: f32,
28468    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28469    pub afx: f32,
28470    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28471    pub afy: f32,
28472    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28473    pub afz: f32,
28474    #[doc = "yaw setpoint"]
28475    pub yaw: f32,
28476    #[doc = "yaw rate setpoint"]
28477    pub yaw_rate: f32,
28478    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28479    pub type_mask: PositionTargetTypemask,
28480    #[doc = "System ID"]
28481    pub target_system: u8,
28482    #[doc = "Component ID"]
28483    pub target_component: u8,
28484    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28485    pub coordinate_frame: MavFrame,
28486}
28487impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28488    pub const ENCODED_LEN: usize = 53usize;
28489    pub const DEFAULT: Self = Self {
28490        time_boot_ms: 0_u32,
28491        x: 0.0_f32,
28492        y: 0.0_f32,
28493        z: 0.0_f32,
28494        vx: 0.0_f32,
28495        vy: 0.0_f32,
28496        vz: 0.0_f32,
28497        afx: 0.0_f32,
28498        afy: 0.0_f32,
28499        afz: 0.0_f32,
28500        yaw: 0.0_f32,
28501        yaw_rate: 0.0_f32,
28502        type_mask: PositionTargetTypemask::DEFAULT,
28503        target_system: 0_u8,
28504        target_component: 0_u8,
28505        coordinate_frame: MavFrame::DEFAULT,
28506    };
28507    #[cfg(feature = "arbitrary")]
28508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28509        use arbitrary::{Arbitrary, Unstructured};
28510        let mut buf = [0u8; 1024];
28511        rng.fill_bytes(&mut buf);
28512        let mut unstructured = Unstructured::new(&buf);
28513        Self::arbitrary(&mut unstructured).unwrap_or_default()
28514    }
28515}
28516impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28517    fn default() -> Self {
28518        Self::DEFAULT.clone()
28519    }
28520}
28521impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28522    type Message = MavMessage;
28523    const ID: u32 = 84u32;
28524    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28525    const EXTRA_CRC: u8 = 143u8;
28526    const ENCODED_LEN: usize = 53usize;
28527    fn deser(
28528        _version: MavlinkVersion,
28529        __input: &[u8],
28530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28531        let avail_len = __input.len();
28532        let mut payload_buf = [0; Self::ENCODED_LEN];
28533        let mut buf = if avail_len < Self::ENCODED_LEN {
28534            payload_buf[0..avail_len].copy_from_slice(__input);
28535            Bytes::new(&payload_buf)
28536        } else {
28537            Bytes::new(__input)
28538        };
28539        let mut __struct = Self::default();
28540        __struct.time_boot_ms = buf.get_u32_le()?;
28541        __struct.x = buf.get_f32_le()?;
28542        __struct.y = buf.get_f32_le()?;
28543        __struct.z = buf.get_f32_le()?;
28544        __struct.vx = buf.get_f32_le()?;
28545        __struct.vy = buf.get_f32_le()?;
28546        __struct.vz = buf.get_f32_le()?;
28547        __struct.afx = buf.get_f32_le()?;
28548        __struct.afy = buf.get_f32_le()?;
28549        __struct.afz = buf.get_f32_le()?;
28550        __struct.yaw = buf.get_f32_le()?;
28551        __struct.yaw_rate = buf.get_f32_le()?;
28552        let tmp = buf.get_u16_le()?;
28553        __struct.type_mask =
28554            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28555                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28556                    flag_type: "PositionTargetTypemask",
28557                    value: tmp as u64,
28558                })?;
28559        __struct.target_system = buf.get_u8()?;
28560        __struct.target_component = buf.get_u8()?;
28561        let tmp = buf.get_u8()?;
28562        __struct.coordinate_frame =
28563            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28564                enum_type: "MavFrame",
28565                value: tmp as u64,
28566            })?;
28567        Ok(__struct)
28568    }
28569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28570        let mut __tmp = BytesMut::new(bytes);
28571        #[allow(clippy::absurd_extreme_comparisons)]
28572        #[allow(unused_comparisons)]
28573        if __tmp.remaining() < Self::ENCODED_LEN {
28574            panic!(
28575                "buffer is too small (need {} bytes, but got {})",
28576                Self::ENCODED_LEN,
28577                __tmp.remaining(),
28578            )
28579        }
28580        __tmp.put_u32_le(self.time_boot_ms);
28581        __tmp.put_f32_le(self.x);
28582        __tmp.put_f32_le(self.y);
28583        __tmp.put_f32_le(self.z);
28584        __tmp.put_f32_le(self.vx);
28585        __tmp.put_f32_le(self.vy);
28586        __tmp.put_f32_le(self.vz);
28587        __tmp.put_f32_le(self.afx);
28588        __tmp.put_f32_le(self.afy);
28589        __tmp.put_f32_le(self.afz);
28590        __tmp.put_f32_le(self.yaw);
28591        __tmp.put_f32_le(self.yaw_rate);
28592        __tmp.put_u16_le(self.type_mask.bits() as u16);
28593        __tmp.put_u8(self.target_system);
28594        __tmp.put_u8(self.target_component);
28595        __tmp.put_u8(self.coordinate_frame as u8);
28596        if matches!(version, MavlinkVersion::V2) {
28597            let len = __tmp.len();
28598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28599        } else {
28600            __tmp.len()
28601        }
28602    }
28603}
28604#[doc = "Status of simulation environment, if used."]
28605#[doc = ""]
28606#[doc = "ID: 108"]
28607#[derive(Debug, Clone, PartialEq)]
28608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28610#[cfg_attr(feature = "ts", derive(TS))]
28611#[cfg_attr(feature = "ts", ts(export))]
28612pub struct SIM_STATE_DATA {
28613    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28614    pub q1: f32,
28615    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28616    pub q2: f32,
28617    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28618    pub q3: f32,
28619    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28620    pub q4: f32,
28621    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28622    pub roll: f32,
28623    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28624    pub pitch: f32,
28625    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28626    pub yaw: f32,
28627    #[doc = "X acceleration"]
28628    pub xacc: f32,
28629    #[doc = "Y acceleration"]
28630    pub yacc: f32,
28631    #[doc = "Z acceleration"]
28632    pub zacc: f32,
28633    #[doc = "Angular speed around X axis"]
28634    pub xgyro: f32,
28635    #[doc = "Angular speed around Y axis"]
28636    pub ygyro: f32,
28637    #[doc = "Angular speed around Z axis"]
28638    pub zgyro: f32,
28639    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28640    pub lat: f32,
28641    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28642    pub lon: f32,
28643    #[doc = "Altitude"]
28644    pub alt: f32,
28645    #[doc = "Horizontal position standard deviation"]
28646    pub std_dev_horz: f32,
28647    #[doc = "Vertical position standard deviation"]
28648    pub std_dev_vert: f32,
28649    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28650    pub vn: f32,
28651    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28652    pub ve: f32,
28653    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28654    pub vd: f32,
28655    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28657    pub lat_int: i32,
28658    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28660    pub lon_int: i32,
28661}
28662impl SIM_STATE_DATA {
28663    pub const ENCODED_LEN: usize = 92usize;
28664    pub const DEFAULT: Self = Self {
28665        q1: 0.0_f32,
28666        q2: 0.0_f32,
28667        q3: 0.0_f32,
28668        q4: 0.0_f32,
28669        roll: 0.0_f32,
28670        pitch: 0.0_f32,
28671        yaw: 0.0_f32,
28672        xacc: 0.0_f32,
28673        yacc: 0.0_f32,
28674        zacc: 0.0_f32,
28675        xgyro: 0.0_f32,
28676        ygyro: 0.0_f32,
28677        zgyro: 0.0_f32,
28678        lat: 0.0_f32,
28679        lon: 0.0_f32,
28680        alt: 0.0_f32,
28681        std_dev_horz: 0.0_f32,
28682        std_dev_vert: 0.0_f32,
28683        vn: 0.0_f32,
28684        ve: 0.0_f32,
28685        vd: 0.0_f32,
28686        lat_int: 0_i32,
28687        lon_int: 0_i32,
28688    };
28689    #[cfg(feature = "arbitrary")]
28690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28691        use arbitrary::{Arbitrary, Unstructured};
28692        let mut buf = [0u8; 1024];
28693        rng.fill_bytes(&mut buf);
28694        let mut unstructured = Unstructured::new(&buf);
28695        Self::arbitrary(&mut unstructured).unwrap_or_default()
28696    }
28697}
28698impl Default for SIM_STATE_DATA {
28699    fn default() -> Self {
28700        Self::DEFAULT.clone()
28701    }
28702}
28703impl MessageData for SIM_STATE_DATA {
28704    type Message = MavMessage;
28705    const ID: u32 = 108u32;
28706    const NAME: &'static str = "SIM_STATE";
28707    const EXTRA_CRC: u8 = 32u8;
28708    const ENCODED_LEN: usize = 92usize;
28709    fn deser(
28710        _version: MavlinkVersion,
28711        __input: &[u8],
28712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28713        let avail_len = __input.len();
28714        let mut payload_buf = [0; Self::ENCODED_LEN];
28715        let mut buf = if avail_len < Self::ENCODED_LEN {
28716            payload_buf[0..avail_len].copy_from_slice(__input);
28717            Bytes::new(&payload_buf)
28718        } else {
28719            Bytes::new(__input)
28720        };
28721        let mut __struct = Self::default();
28722        __struct.q1 = buf.get_f32_le()?;
28723        __struct.q2 = buf.get_f32_le()?;
28724        __struct.q3 = buf.get_f32_le()?;
28725        __struct.q4 = buf.get_f32_le()?;
28726        __struct.roll = buf.get_f32_le()?;
28727        __struct.pitch = buf.get_f32_le()?;
28728        __struct.yaw = buf.get_f32_le()?;
28729        __struct.xacc = buf.get_f32_le()?;
28730        __struct.yacc = buf.get_f32_le()?;
28731        __struct.zacc = buf.get_f32_le()?;
28732        __struct.xgyro = buf.get_f32_le()?;
28733        __struct.ygyro = buf.get_f32_le()?;
28734        __struct.zgyro = buf.get_f32_le()?;
28735        __struct.lat = buf.get_f32_le()?;
28736        __struct.lon = buf.get_f32_le()?;
28737        __struct.alt = buf.get_f32_le()?;
28738        __struct.std_dev_horz = buf.get_f32_le()?;
28739        __struct.std_dev_vert = buf.get_f32_le()?;
28740        __struct.vn = buf.get_f32_le()?;
28741        __struct.ve = buf.get_f32_le()?;
28742        __struct.vd = buf.get_f32_le()?;
28743        __struct.lat_int = buf.get_i32_le()?;
28744        __struct.lon_int = buf.get_i32_le()?;
28745        Ok(__struct)
28746    }
28747    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28748        let mut __tmp = BytesMut::new(bytes);
28749        #[allow(clippy::absurd_extreme_comparisons)]
28750        #[allow(unused_comparisons)]
28751        if __tmp.remaining() < Self::ENCODED_LEN {
28752            panic!(
28753                "buffer is too small (need {} bytes, but got {})",
28754                Self::ENCODED_LEN,
28755                __tmp.remaining(),
28756            )
28757        }
28758        __tmp.put_f32_le(self.q1);
28759        __tmp.put_f32_le(self.q2);
28760        __tmp.put_f32_le(self.q3);
28761        __tmp.put_f32_le(self.q4);
28762        __tmp.put_f32_le(self.roll);
28763        __tmp.put_f32_le(self.pitch);
28764        __tmp.put_f32_le(self.yaw);
28765        __tmp.put_f32_le(self.xacc);
28766        __tmp.put_f32_le(self.yacc);
28767        __tmp.put_f32_le(self.zacc);
28768        __tmp.put_f32_le(self.xgyro);
28769        __tmp.put_f32_le(self.ygyro);
28770        __tmp.put_f32_le(self.zgyro);
28771        __tmp.put_f32_le(self.lat);
28772        __tmp.put_f32_le(self.lon);
28773        __tmp.put_f32_le(self.alt);
28774        __tmp.put_f32_le(self.std_dev_horz);
28775        __tmp.put_f32_le(self.std_dev_vert);
28776        __tmp.put_f32_le(self.vn);
28777        __tmp.put_f32_le(self.ve);
28778        __tmp.put_f32_le(self.vd);
28779        if matches!(version, MavlinkVersion::V2) {
28780            __tmp.put_i32_le(self.lat_int);
28781            __tmp.put_i32_le(self.lon_int);
28782            let len = __tmp.len();
28783            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28784        } else {
28785            __tmp.len()
28786        }
28787    }
28788}
28789#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28790#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28791#[doc = ""]
28792#[doc = "ID: 370"]
28793#[derive(Debug, Clone, PartialEq)]
28794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28796#[cfg_attr(feature = "ts", derive(TS))]
28797#[cfg_attr(feature = "ts", ts(export))]
28798pub struct SMART_BATTERY_INFO_DATA {
28799    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28800    pub capacity_full_specification: i32,
28801    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28802    pub capacity_full: i32,
28803    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28804    pub cycle_count: u16,
28805    #[doc = "Battery weight. 0: field not provided."]
28806    pub weight: u16,
28807    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28808    pub discharge_minimum_voltage: u16,
28809    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28810    pub charging_minimum_voltage: u16,
28811    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28812    pub resting_minimum_voltage: u16,
28813    #[doc = "Battery ID"]
28814    pub id: u8,
28815    #[doc = "Function of the battery"]
28816    pub battery_function: MavBatteryFunction,
28817    #[doc = "Type (chemistry) of the battery"]
28818    pub mavtype: MavBatteryType,
28819    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28820    #[cfg_attr(feature = "ts", ts(type = "string"))]
28821    pub serial_number: CharArray<16>,
28822    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28823    #[cfg_attr(feature = "ts", ts(type = "string"))]
28824    pub device_name: CharArray<50>,
28825    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28826    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28827    pub charging_maximum_voltage: u16,
28828    #[doc = "Number of battery cells in series. 0: field not provided."]
28829    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28830    pub cells_in_series: u8,
28831    #[doc = "Maximum pack discharge current. 0: field not provided."]
28832    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28833    pub discharge_maximum_current: u32,
28834    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28835    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28836    pub discharge_maximum_burst_current: u32,
28837    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28838    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28839    #[cfg_attr(feature = "ts", ts(type = "string"))]
28840    pub manufacture_date: CharArray<11>,
28841}
28842impl SMART_BATTERY_INFO_DATA {
28843    pub const ENCODED_LEN: usize = 109usize;
28844    pub const DEFAULT: Self = Self {
28845        capacity_full_specification: 0_i32,
28846        capacity_full: 0_i32,
28847        cycle_count: 0_u16,
28848        weight: 0_u16,
28849        discharge_minimum_voltage: 0_u16,
28850        charging_minimum_voltage: 0_u16,
28851        resting_minimum_voltage: 0_u16,
28852        id: 0_u8,
28853        battery_function: MavBatteryFunction::DEFAULT,
28854        mavtype: MavBatteryType::DEFAULT,
28855        serial_number: CharArray::new([0_u8; 16usize]),
28856        device_name: CharArray::new([0_u8; 50usize]),
28857        charging_maximum_voltage: 0_u16,
28858        cells_in_series: 0_u8,
28859        discharge_maximum_current: 0_u32,
28860        discharge_maximum_burst_current: 0_u32,
28861        manufacture_date: CharArray::new([0_u8; 11usize]),
28862    };
28863    #[cfg(feature = "arbitrary")]
28864    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28865        use arbitrary::{Arbitrary, Unstructured};
28866        let mut buf = [0u8; 1024];
28867        rng.fill_bytes(&mut buf);
28868        let mut unstructured = Unstructured::new(&buf);
28869        Self::arbitrary(&mut unstructured).unwrap_or_default()
28870    }
28871}
28872impl Default for SMART_BATTERY_INFO_DATA {
28873    fn default() -> Self {
28874        Self::DEFAULT.clone()
28875    }
28876}
28877impl MessageData for SMART_BATTERY_INFO_DATA {
28878    type Message = MavMessage;
28879    const ID: u32 = 370u32;
28880    const NAME: &'static str = "SMART_BATTERY_INFO";
28881    const EXTRA_CRC: u8 = 75u8;
28882    const ENCODED_LEN: usize = 109usize;
28883    fn deser(
28884        _version: MavlinkVersion,
28885        __input: &[u8],
28886    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28887        let avail_len = __input.len();
28888        let mut payload_buf = [0; Self::ENCODED_LEN];
28889        let mut buf = if avail_len < Self::ENCODED_LEN {
28890            payload_buf[0..avail_len].copy_from_slice(__input);
28891            Bytes::new(&payload_buf)
28892        } else {
28893            Bytes::new(__input)
28894        };
28895        let mut __struct = Self::default();
28896        __struct.capacity_full_specification = buf.get_i32_le()?;
28897        __struct.capacity_full = buf.get_i32_le()?;
28898        __struct.cycle_count = buf.get_u16_le()?;
28899        __struct.weight = buf.get_u16_le()?;
28900        __struct.discharge_minimum_voltage = buf.get_u16_le()?;
28901        __struct.charging_minimum_voltage = buf.get_u16_le()?;
28902        __struct.resting_minimum_voltage = buf.get_u16_le()?;
28903        __struct.id = buf.get_u8()?;
28904        let tmp = buf.get_u8()?;
28905        __struct.battery_function =
28906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28907                enum_type: "MavBatteryFunction",
28908                value: tmp as u64,
28909            })?;
28910        let tmp = buf.get_u8()?;
28911        __struct.mavtype =
28912            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28913                enum_type: "MavBatteryType",
28914                value: tmp as u64,
28915            })?;
28916        let mut tmp = [0_u8; 16usize];
28917        for v in &mut tmp {
28918            *v = buf.get_u8()?;
28919        }
28920        __struct.serial_number = CharArray::new(tmp);
28921        let mut tmp = [0_u8; 50usize];
28922        for v in &mut tmp {
28923            *v = buf.get_u8()?;
28924        }
28925        __struct.device_name = CharArray::new(tmp);
28926        __struct.charging_maximum_voltage = buf.get_u16_le()?;
28927        __struct.cells_in_series = buf.get_u8()?;
28928        __struct.discharge_maximum_current = buf.get_u32_le()?;
28929        __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
28930        let mut tmp = [0_u8; 11usize];
28931        for v in &mut tmp {
28932            *v = buf.get_u8()?;
28933        }
28934        __struct.manufacture_date = CharArray::new(tmp);
28935        Ok(__struct)
28936    }
28937    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28938        let mut __tmp = BytesMut::new(bytes);
28939        #[allow(clippy::absurd_extreme_comparisons)]
28940        #[allow(unused_comparisons)]
28941        if __tmp.remaining() < Self::ENCODED_LEN {
28942            panic!(
28943                "buffer is too small (need {} bytes, but got {})",
28944                Self::ENCODED_LEN,
28945                __tmp.remaining(),
28946            )
28947        }
28948        __tmp.put_i32_le(self.capacity_full_specification);
28949        __tmp.put_i32_le(self.capacity_full);
28950        __tmp.put_u16_le(self.cycle_count);
28951        __tmp.put_u16_le(self.weight);
28952        __tmp.put_u16_le(self.discharge_minimum_voltage);
28953        __tmp.put_u16_le(self.charging_minimum_voltage);
28954        __tmp.put_u16_le(self.resting_minimum_voltage);
28955        __tmp.put_u8(self.id);
28956        __tmp.put_u8(self.battery_function as u8);
28957        __tmp.put_u8(self.mavtype as u8);
28958        for val in &self.serial_number {
28959            __tmp.put_u8(*val);
28960        }
28961        for val in &self.device_name {
28962            __tmp.put_u8(*val);
28963        }
28964        if matches!(version, MavlinkVersion::V2) {
28965            __tmp.put_u16_le(self.charging_maximum_voltage);
28966            __tmp.put_u8(self.cells_in_series);
28967            __tmp.put_u32_le(self.discharge_maximum_current);
28968            __tmp.put_u32_le(self.discharge_maximum_burst_current);
28969            for val in &self.manufacture_date {
28970                __tmp.put_u8(*val);
28971            }
28972            let len = __tmp.len();
28973            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28974        } else {
28975            __tmp.len()
28976        }
28977    }
28978}
28979#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
28980#[doc = ""]
28981#[doc = "ID: 253"]
28982#[derive(Debug, Clone, PartialEq)]
28983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28985#[cfg_attr(feature = "ts", derive(TS))]
28986#[cfg_attr(feature = "ts", ts(export))]
28987pub struct STATUSTEXT_DATA {
28988    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
28989    pub severity: MavSeverity,
28990    #[doc = "Status text message, without null termination character"]
28991    #[cfg_attr(feature = "ts", ts(type = "string"))]
28992    pub text: CharArray<50>,
28993    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
28994    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28995    pub id: u16,
28996    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
28997    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28998    pub chunk_seq: u8,
28999}
29000impl STATUSTEXT_DATA {
29001    pub const ENCODED_LEN: usize = 54usize;
29002    pub const DEFAULT: Self = Self {
29003        severity: MavSeverity::DEFAULT,
29004        text: CharArray::new([0_u8; 50usize]),
29005        id: 0_u16,
29006        chunk_seq: 0_u8,
29007    };
29008    #[cfg(feature = "arbitrary")]
29009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29010        use arbitrary::{Arbitrary, Unstructured};
29011        let mut buf = [0u8; 1024];
29012        rng.fill_bytes(&mut buf);
29013        let mut unstructured = Unstructured::new(&buf);
29014        Self::arbitrary(&mut unstructured).unwrap_or_default()
29015    }
29016}
29017impl Default for STATUSTEXT_DATA {
29018    fn default() -> Self {
29019        Self::DEFAULT.clone()
29020    }
29021}
29022impl MessageData for STATUSTEXT_DATA {
29023    type Message = MavMessage;
29024    const ID: u32 = 253u32;
29025    const NAME: &'static str = "STATUSTEXT";
29026    const EXTRA_CRC: u8 = 83u8;
29027    const ENCODED_LEN: usize = 54usize;
29028    fn deser(
29029        _version: MavlinkVersion,
29030        __input: &[u8],
29031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29032        let avail_len = __input.len();
29033        let mut payload_buf = [0; Self::ENCODED_LEN];
29034        let mut buf = if avail_len < Self::ENCODED_LEN {
29035            payload_buf[0..avail_len].copy_from_slice(__input);
29036            Bytes::new(&payload_buf)
29037        } else {
29038            Bytes::new(__input)
29039        };
29040        let mut __struct = Self::default();
29041        let tmp = buf.get_u8()?;
29042        __struct.severity =
29043            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29044                enum_type: "MavSeverity",
29045                value: tmp as u64,
29046            })?;
29047        let mut tmp = [0_u8; 50usize];
29048        for v in &mut tmp {
29049            *v = buf.get_u8()?;
29050        }
29051        __struct.text = CharArray::new(tmp);
29052        __struct.id = buf.get_u16_le()?;
29053        __struct.chunk_seq = buf.get_u8()?;
29054        Ok(__struct)
29055    }
29056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29057        let mut __tmp = BytesMut::new(bytes);
29058        #[allow(clippy::absurd_extreme_comparisons)]
29059        #[allow(unused_comparisons)]
29060        if __tmp.remaining() < Self::ENCODED_LEN {
29061            panic!(
29062                "buffer is too small (need {} bytes, but got {})",
29063                Self::ENCODED_LEN,
29064                __tmp.remaining(),
29065            )
29066        }
29067        __tmp.put_u8(self.severity as u8);
29068        for val in &self.text {
29069            __tmp.put_u8(*val);
29070        }
29071        if matches!(version, MavlinkVersion::V2) {
29072            __tmp.put_u16_le(self.id);
29073            __tmp.put_u8(self.chunk_seq);
29074            let len = __tmp.len();
29075            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29076        } else {
29077            __tmp.len()
29078        }
29079    }
29080}
29081#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29082#[doc = ""]
29083#[doc = "ID: 261"]
29084#[derive(Debug, Clone, PartialEq)]
29085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29087#[cfg_attr(feature = "ts", derive(TS))]
29088#[cfg_attr(feature = "ts", ts(export))]
29089pub struct STORAGE_INFORMATION_DATA {
29090    #[doc = "Timestamp (time since system boot)."]
29091    pub time_boot_ms: u32,
29092    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29093    pub total_capacity: f32,
29094    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29095    pub used_capacity: f32,
29096    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29097    pub available_capacity: f32,
29098    #[doc = "Read speed."]
29099    pub read_speed: f32,
29100    #[doc = "Write speed."]
29101    pub write_speed: f32,
29102    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29103    pub storage_id: u8,
29104    #[doc = "Number of storage devices"]
29105    pub storage_count: u8,
29106    #[doc = "Status of storage"]
29107    pub status: StorageStatus,
29108    #[doc = "Type of storage"]
29109    #[cfg_attr(feature = "serde", serde(default))]
29110    pub mavtype: StorageType,
29111    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29112    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29113    #[cfg_attr(feature = "ts", ts(type = "string"))]
29114    pub name: CharArray<32>,
29115    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29116    #[cfg_attr(feature = "serde", serde(default))]
29117    pub storage_usage: StorageUsageFlag,
29118}
29119impl STORAGE_INFORMATION_DATA {
29120    pub const ENCODED_LEN: usize = 61usize;
29121    pub const DEFAULT: Self = Self {
29122        time_boot_ms: 0_u32,
29123        total_capacity: 0.0_f32,
29124        used_capacity: 0.0_f32,
29125        available_capacity: 0.0_f32,
29126        read_speed: 0.0_f32,
29127        write_speed: 0.0_f32,
29128        storage_id: 0_u8,
29129        storage_count: 0_u8,
29130        status: StorageStatus::DEFAULT,
29131        mavtype: StorageType::DEFAULT,
29132        name: CharArray::new([0_u8; 32usize]),
29133        storage_usage: StorageUsageFlag::DEFAULT,
29134    };
29135    #[cfg(feature = "arbitrary")]
29136    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29137        use arbitrary::{Arbitrary, Unstructured};
29138        let mut buf = [0u8; 1024];
29139        rng.fill_bytes(&mut buf);
29140        let mut unstructured = Unstructured::new(&buf);
29141        Self::arbitrary(&mut unstructured).unwrap_or_default()
29142    }
29143}
29144impl Default for STORAGE_INFORMATION_DATA {
29145    fn default() -> Self {
29146        Self::DEFAULT.clone()
29147    }
29148}
29149impl MessageData for STORAGE_INFORMATION_DATA {
29150    type Message = MavMessage;
29151    const ID: u32 = 261u32;
29152    const NAME: &'static str = "STORAGE_INFORMATION";
29153    const EXTRA_CRC: u8 = 179u8;
29154    const ENCODED_LEN: usize = 61usize;
29155    fn deser(
29156        _version: MavlinkVersion,
29157        __input: &[u8],
29158    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29159        let avail_len = __input.len();
29160        let mut payload_buf = [0; Self::ENCODED_LEN];
29161        let mut buf = if avail_len < Self::ENCODED_LEN {
29162            payload_buf[0..avail_len].copy_from_slice(__input);
29163            Bytes::new(&payload_buf)
29164        } else {
29165            Bytes::new(__input)
29166        };
29167        let mut __struct = Self::default();
29168        __struct.time_boot_ms = buf.get_u32_le()?;
29169        __struct.total_capacity = buf.get_f32_le()?;
29170        __struct.used_capacity = buf.get_f32_le()?;
29171        __struct.available_capacity = buf.get_f32_le()?;
29172        __struct.read_speed = buf.get_f32_le()?;
29173        __struct.write_speed = buf.get_f32_le()?;
29174        __struct.storage_id = buf.get_u8()?;
29175        __struct.storage_count = buf.get_u8()?;
29176        let tmp = buf.get_u8()?;
29177        __struct.status =
29178            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29179                enum_type: "StorageStatus",
29180                value: tmp as u64,
29181            })?;
29182        let tmp = buf.get_u8()?;
29183        __struct.mavtype =
29184            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29185                enum_type: "StorageType",
29186                value: tmp as u64,
29187            })?;
29188        let mut tmp = [0_u8; 32usize];
29189        for v in &mut tmp {
29190            *v = buf.get_u8()?;
29191        }
29192        __struct.name = CharArray::new(tmp);
29193        let tmp = buf.get_u8()?;
29194        __struct.storage_usage = StorageUsageFlag::from_bits(
29195            tmp as <StorageUsageFlag as Flags>::Bits,
29196        )
29197        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29198            flag_type: "StorageUsageFlag",
29199            value: tmp as u64,
29200        })?;
29201        Ok(__struct)
29202    }
29203    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29204        let mut __tmp = BytesMut::new(bytes);
29205        #[allow(clippy::absurd_extreme_comparisons)]
29206        #[allow(unused_comparisons)]
29207        if __tmp.remaining() < Self::ENCODED_LEN {
29208            panic!(
29209                "buffer is too small (need {} bytes, but got {})",
29210                Self::ENCODED_LEN,
29211                __tmp.remaining(),
29212            )
29213        }
29214        __tmp.put_u32_le(self.time_boot_ms);
29215        __tmp.put_f32_le(self.total_capacity);
29216        __tmp.put_f32_le(self.used_capacity);
29217        __tmp.put_f32_le(self.available_capacity);
29218        __tmp.put_f32_le(self.read_speed);
29219        __tmp.put_f32_le(self.write_speed);
29220        __tmp.put_u8(self.storage_id);
29221        __tmp.put_u8(self.storage_count);
29222        __tmp.put_u8(self.status as u8);
29223        if matches!(version, MavlinkVersion::V2) {
29224            __tmp.put_u8(self.mavtype as u8);
29225            for val in &self.name {
29226                __tmp.put_u8(*val);
29227            }
29228            __tmp.put_u8(self.storage_usage.bits() as u8);
29229            let len = __tmp.len();
29230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29231        } else {
29232            __tmp.len()
29233        }
29234    }
29235}
29236#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29237#[doc = ""]
29238#[doc = "ID: 401"]
29239#[derive(Debug, Clone, PartialEq)]
29240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29241#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29242#[cfg_attr(feature = "ts", derive(TS))]
29243#[cfg_attr(feature = "ts", ts(export))]
29244pub struct SUPPORTED_TUNES_DATA {
29245    #[doc = "Bitfield of supported tune formats."]
29246    pub format: TuneFormat,
29247    #[doc = "System ID"]
29248    pub target_system: u8,
29249    #[doc = "Component ID"]
29250    pub target_component: u8,
29251}
29252impl SUPPORTED_TUNES_DATA {
29253    pub const ENCODED_LEN: usize = 6usize;
29254    pub const DEFAULT: Self = Self {
29255        format: TuneFormat::DEFAULT,
29256        target_system: 0_u8,
29257        target_component: 0_u8,
29258    };
29259    #[cfg(feature = "arbitrary")]
29260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29261        use arbitrary::{Arbitrary, Unstructured};
29262        let mut buf = [0u8; 1024];
29263        rng.fill_bytes(&mut buf);
29264        let mut unstructured = Unstructured::new(&buf);
29265        Self::arbitrary(&mut unstructured).unwrap_or_default()
29266    }
29267}
29268impl Default for SUPPORTED_TUNES_DATA {
29269    fn default() -> Self {
29270        Self::DEFAULT.clone()
29271    }
29272}
29273impl MessageData for SUPPORTED_TUNES_DATA {
29274    type Message = MavMessage;
29275    const ID: u32 = 401u32;
29276    const NAME: &'static str = "SUPPORTED_TUNES";
29277    const EXTRA_CRC: u8 = 183u8;
29278    const ENCODED_LEN: usize = 6usize;
29279    fn deser(
29280        _version: MavlinkVersion,
29281        __input: &[u8],
29282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29283        let avail_len = __input.len();
29284        let mut payload_buf = [0; Self::ENCODED_LEN];
29285        let mut buf = if avail_len < Self::ENCODED_LEN {
29286            payload_buf[0..avail_len].copy_from_slice(__input);
29287            Bytes::new(&payload_buf)
29288        } else {
29289            Bytes::new(__input)
29290        };
29291        let mut __struct = Self::default();
29292        let tmp = buf.get_u32_le()?;
29293        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29294            ::mavlink_core::error::ParserError::InvalidEnum {
29295                enum_type: "TuneFormat",
29296                value: tmp as u64,
29297            },
29298        )?;
29299        __struct.target_system = buf.get_u8()?;
29300        __struct.target_component = buf.get_u8()?;
29301        Ok(__struct)
29302    }
29303    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29304        let mut __tmp = BytesMut::new(bytes);
29305        #[allow(clippy::absurd_extreme_comparisons)]
29306        #[allow(unused_comparisons)]
29307        if __tmp.remaining() < Self::ENCODED_LEN {
29308            panic!(
29309                "buffer is too small (need {} bytes, but got {})",
29310                Self::ENCODED_LEN,
29311                __tmp.remaining(),
29312            )
29313        }
29314        __tmp.put_u32_le(self.format as u32);
29315        __tmp.put_u8(self.target_system);
29316        __tmp.put_u8(self.target_component);
29317        if matches!(version, MavlinkVersion::V2) {
29318            let len = __tmp.len();
29319            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29320        } else {
29321            __tmp.len()
29322        }
29323    }
29324}
29325#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29326#[doc = ""]
29327#[doc = "ID: 2"]
29328#[derive(Debug, Clone, PartialEq)]
29329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29331#[cfg_attr(feature = "ts", derive(TS))]
29332#[cfg_attr(feature = "ts", ts(export))]
29333pub struct SYSTEM_TIME_DATA {
29334    #[doc = "Timestamp (UNIX epoch time)."]
29335    pub time_unix_usec: u64,
29336    #[doc = "Timestamp (time since system boot)."]
29337    pub time_boot_ms: u32,
29338}
29339impl SYSTEM_TIME_DATA {
29340    pub const ENCODED_LEN: usize = 12usize;
29341    pub const DEFAULT: Self = Self {
29342        time_unix_usec: 0_u64,
29343        time_boot_ms: 0_u32,
29344    };
29345    #[cfg(feature = "arbitrary")]
29346    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29347        use arbitrary::{Arbitrary, Unstructured};
29348        let mut buf = [0u8; 1024];
29349        rng.fill_bytes(&mut buf);
29350        let mut unstructured = Unstructured::new(&buf);
29351        Self::arbitrary(&mut unstructured).unwrap_or_default()
29352    }
29353}
29354impl Default for SYSTEM_TIME_DATA {
29355    fn default() -> Self {
29356        Self::DEFAULT.clone()
29357    }
29358}
29359impl MessageData for SYSTEM_TIME_DATA {
29360    type Message = MavMessage;
29361    const ID: u32 = 2u32;
29362    const NAME: &'static str = "SYSTEM_TIME";
29363    const EXTRA_CRC: u8 = 137u8;
29364    const ENCODED_LEN: usize = 12usize;
29365    fn deser(
29366        _version: MavlinkVersion,
29367        __input: &[u8],
29368    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29369        let avail_len = __input.len();
29370        let mut payload_buf = [0; Self::ENCODED_LEN];
29371        let mut buf = if avail_len < Self::ENCODED_LEN {
29372            payload_buf[0..avail_len].copy_from_slice(__input);
29373            Bytes::new(&payload_buf)
29374        } else {
29375            Bytes::new(__input)
29376        };
29377        let mut __struct = Self::default();
29378        __struct.time_unix_usec = buf.get_u64_le()?;
29379        __struct.time_boot_ms = buf.get_u32_le()?;
29380        Ok(__struct)
29381    }
29382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29383        let mut __tmp = BytesMut::new(bytes);
29384        #[allow(clippy::absurd_extreme_comparisons)]
29385        #[allow(unused_comparisons)]
29386        if __tmp.remaining() < Self::ENCODED_LEN {
29387            panic!(
29388                "buffer is too small (need {} bytes, but got {})",
29389                Self::ENCODED_LEN,
29390                __tmp.remaining(),
29391            )
29392        }
29393        __tmp.put_u64_le(self.time_unix_usec);
29394        __tmp.put_u32_le(self.time_boot_ms);
29395        if matches!(version, MavlinkVersion::V2) {
29396            let len = __tmp.len();
29397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29398        } else {
29399            __tmp.len()
29400        }
29401    }
29402}
29403#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29404#[doc = ""]
29405#[doc = "ID: 1"]
29406#[derive(Debug, Clone, PartialEq)]
29407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29409#[cfg_attr(feature = "ts", derive(TS))]
29410#[cfg_attr(feature = "ts", ts(export))]
29411pub struct SYS_STATUS_DATA {
29412    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29413    pub onboard_control_sensors_present: MavSysStatusSensor,
29414    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29415    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29416    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29417    pub onboard_control_sensors_health: MavSysStatusSensor,
29418    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29419    pub load: u16,
29420    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29421    pub voltage_battery: u16,
29422    #[doc = "Battery current, -1: Current not sent by autopilot"]
29423    pub current_battery: i16,
29424    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29425    pub drop_rate_comm: u16,
29426    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29427    pub errors_comm: u16,
29428    #[doc = "Autopilot-specific errors"]
29429    pub errors_count1: u16,
29430    #[doc = "Autopilot-specific errors"]
29431    pub errors_count2: u16,
29432    #[doc = "Autopilot-specific errors"]
29433    pub errors_count3: u16,
29434    #[doc = "Autopilot-specific errors"]
29435    pub errors_count4: u16,
29436    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29437    pub battery_remaining: i8,
29438    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29439    #[cfg_attr(feature = "serde", serde(default))]
29440    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29441    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29442    #[cfg_attr(feature = "serde", serde(default))]
29443    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29444    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29445    #[cfg_attr(feature = "serde", serde(default))]
29446    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29447}
29448impl SYS_STATUS_DATA {
29449    pub const ENCODED_LEN: usize = 43usize;
29450    pub const DEFAULT: Self = Self {
29451        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29452        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29453        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29454        load: 0_u16,
29455        voltage_battery: 0_u16,
29456        current_battery: 0_i16,
29457        drop_rate_comm: 0_u16,
29458        errors_comm: 0_u16,
29459        errors_count1: 0_u16,
29460        errors_count2: 0_u16,
29461        errors_count3: 0_u16,
29462        errors_count4: 0_u16,
29463        battery_remaining: 0_i8,
29464        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29465        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29466        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29467    };
29468    #[cfg(feature = "arbitrary")]
29469    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29470        use arbitrary::{Arbitrary, Unstructured};
29471        let mut buf = [0u8; 1024];
29472        rng.fill_bytes(&mut buf);
29473        let mut unstructured = Unstructured::new(&buf);
29474        Self::arbitrary(&mut unstructured).unwrap_or_default()
29475    }
29476}
29477impl Default for SYS_STATUS_DATA {
29478    fn default() -> Self {
29479        Self::DEFAULT.clone()
29480    }
29481}
29482impl MessageData for SYS_STATUS_DATA {
29483    type Message = MavMessage;
29484    const ID: u32 = 1u32;
29485    const NAME: &'static str = "SYS_STATUS";
29486    const EXTRA_CRC: u8 = 124u8;
29487    const ENCODED_LEN: usize = 43usize;
29488    fn deser(
29489        _version: MavlinkVersion,
29490        __input: &[u8],
29491    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29492        let avail_len = __input.len();
29493        let mut payload_buf = [0; Self::ENCODED_LEN];
29494        let mut buf = if avail_len < Self::ENCODED_LEN {
29495            payload_buf[0..avail_len].copy_from_slice(__input);
29496            Bytes::new(&payload_buf)
29497        } else {
29498            Bytes::new(__input)
29499        };
29500        let mut __struct = Self::default();
29501        let tmp = buf.get_u32_le()?;
29502        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29503            tmp as <MavSysStatusSensor as Flags>::Bits,
29504        )
29505        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29506            flag_type: "MavSysStatusSensor",
29507            value: tmp as u64,
29508        })?;
29509        let tmp = buf.get_u32_le()?;
29510        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29511            tmp as <MavSysStatusSensor as Flags>::Bits,
29512        )
29513        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29514            flag_type: "MavSysStatusSensor",
29515            value: tmp as u64,
29516        })?;
29517        let tmp = buf.get_u32_le()?;
29518        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29519            tmp as <MavSysStatusSensor as Flags>::Bits,
29520        )
29521        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29522            flag_type: "MavSysStatusSensor",
29523            value: tmp as u64,
29524        })?;
29525        __struct.load = buf.get_u16_le()?;
29526        __struct.voltage_battery = buf.get_u16_le()?;
29527        __struct.current_battery = buf.get_i16_le()?;
29528        __struct.drop_rate_comm = buf.get_u16_le()?;
29529        __struct.errors_comm = buf.get_u16_le()?;
29530        __struct.errors_count1 = buf.get_u16_le()?;
29531        __struct.errors_count2 = buf.get_u16_le()?;
29532        __struct.errors_count3 = buf.get_u16_le()?;
29533        __struct.errors_count4 = buf.get_u16_le()?;
29534        __struct.battery_remaining = buf.get_i8()?;
29535        let tmp = buf.get_u32_le()?;
29536        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
29537            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29538        )
29539        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29540            flag_type: "MavSysStatusSensorExtended",
29541            value: tmp as u64,
29542        })?;
29543        let tmp = buf.get_u32_le()?;
29544        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
29545            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29546        )
29547        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29548            flag_type: "MavSysStatusSensorExtended",
29549            value: tmp as u64,
29550        })?;
29551        let tmp = buf.get_u32_le()?;
29552        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
29553            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29554        )
29555        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29556            flag_type: "MavSysStatusSensorExtended",
29557            value: tmp as u64,
29558        })?;
29559        Ok(__struct)
29560    }
29561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29562        let mut __tmp = BytesMut::new(bytes);
29563        #[allow(clippy::absurd_extreme_comparisons)]
29564        #[allow(unused_comparisons)]
29565        if __tmp.remaining() < Self::ENCODED_LEN {
29566            panic!(
29567                "buffer is too small (need {} bytes, but got {})",
29568                Self::ENCODED_LEN,
29569                __tmp.remaining(),
29570            )
29571        }
29572        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
29573        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
29574        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
29575        __tmp.put_u16_le(self.load);
29576        __tmp.put_u16_le(self.voltage_battery);
29577        __tmp.put_i16_le(self.current_battery);
29578        __tmp.put_u16_le(self.drop_rate_comm);
29579        __tmp.put_u16_le(self.errors_comm);
29580        __tmp.put_u16_le(self.errors_count1);
29581        __tmp.put_u16_le(self.errors_count2);
29582        __tmp.put_u16_le(self.errors_count3);
29583        __tmp.put_u16_le(self.errors_count4);
29584        __tmp.put_i8(self.battery_remaining);
29585        if matches!(version, MavlinkVersion::V2) {
29586            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
29587            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
29588            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
29589            let len = __tmp.len();
29590            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29591        } else {
29592            __tmp.len()
29593        }
29594    }
29595}
29596#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29597#[doc = ""]
29598#[doc = "ID: 135"]
29599#[derive(Debug, Clone, PartialEq)]
29600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29601#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29602#[cfg_attr(feature = "ts", derive(TS))]
29603#[cfg_attr(feature = "ts", ts(export))]
29604pub struct TERRAIN_CHECK_DATA {
29605    #[doc = "Latitude"]
29606    pub lat: i32,
29607    #[doc = "Longitude"]
29608    pub lon: i32,
29609}
29610impl TERRAIN_CHECK_DATA {
29611    pub const ENCODED_LEN: usize = 8usize;
29612    pub const DEFAULT: Self = Self {
29613        lat: 0_i32,
29614        lon: 0_i32,
29615    };
29616    #[cfg(feature = "arbitrary")]
29617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29618        use arbitrary::{Arbitrary, Unstructured};
29619        let mut buf = [0u8; 1024];
29620        rng.fill_bytes(&mut buf);
29621        let mut unstructured = Unstructured::new(&buf);
29622        Self::arbitrary(&mut unstructured).unwrap_or_default()
29623    }
29624}
29625impl Default for TERRAIN_CHECK_DATA {
29626    fn default() -> Self {
29627        Self::DEFAULT.clone()
29628    }
29629}
29630impl MessageData for TERRAIN_CHECK_DATA {
29631    type Message = MavMessage;
29632    const ID: u32 = 135u32;
29633    const NAME: &'static str = "TERRAIN_CHECK";
29634    const EXTRA_CRC: u8 = 203u8;
29635    const ENCODED_LEN: usize = 8usize;
29636    fn deser(
29637        _version: MavlinkVersion,
29638        __input: &[u8],
29639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29640        let avail_len = __input.len();
29641        let mut payload_buf = [0; Self::ENCODED_LEN];
29642        let mut buf = if avail_len < Self::ENCODED_LEN {
29643            payload_buf[0..avail_len].copy_from_slice(__input);
29644            Bytes::new(&payload_buf)
29645        } else {
29646            Bytes::new(__input)
29647        };
29648        let mut __struct = Self::default();
29649        __struct.lat = buf.get_i32_le()?;
29650        __struct.lon = buf.get_i32_le()?;
29651        Ok(__struct)
29652    }
29653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29654        let mut __tmp = BytesMut::new(bytes);
29655        #[allow(clippy::absurd_extreme_comparisons)]
29656        #[allow(unused_comparisons)]
29657        if __tmp.remaining() < Self::ENCODED_LEN {
29658            panic!(
29659                "buffer is too small (need {} bytes, but got {})",
29660                Self::ENCODED_LEN,
29661                __tmp.remaining(),
29662            )
29663        }
29664        __tmp.put_i32_le(self.lat);
29665        __tmp.put_i32_le(self.lon);
29666        if matches!(version, MavlinkVersion::V2) {
29667            let len = __tmp.len();
29668            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29669        } else {
29670            __tmp.len()
29671        }
29672    }
29673}
29674#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29675#[doc = ""]
29676#[doc = "ID: 134"]
29677#[derive(Debug, Clone, PartialEq)]
29678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29680#[cfg_attr(feature = "ts", derive(TS))]
29681#[cfg_attr(feature = "ts", ts(export))]
29682pub struct TERRAIN_DATA_DATA {
29683    #[doc = "Latitude of SW corner of first grid"]
29684    pub lat: i32,
29685    #[doc = "Longitude of SW corner of first grid"]
29686    pub lon: i32,
29687    #[doc = "Grid spacing"]
29688    pub grid_spacing: u16,
29689    #[doc = "Terrain data MSL"]
29690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29691    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29692    pub data: [i16; 16],
29693    #[doc = "bit within the terrain request mask"]
29694    pub gridbit: u8,
29695}
29696impl TERRAIN_DATA_DATA {
29697    pub const ENCODED_LEN: usize = 43usize;
29698    pub const DEFAULT: Self = Self {
29699        lat: 0_i32,
29700        lon: 0_i32,
29701        grid_spacing: 0_u16,
29702        data: [0_i16; 16usize],
29703        gridbit: 0_u8,
29704    };
29705    #[cfg(feature = "arbitrary")]
29706    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29707        use arbitrary::{Arbitrary, Unstructured};
29708        let mut buf = [0u8; 1024];
29709        rng.fill_bytes(&mut buf);
29710        let mut unstructured = Unstructured::new(&buf);
29711        Self::arbitrary(&mut unstructured).unwrap_or_default()
29712    }
29713}
29714impl Default for TERRAIN_DATA_DATA {
29715    fn default() -> Self {
29716        Self::DEFAULT.clone()
29717    }
29718}
29719impl MessageData for TERRAIN_DATA_DATA {
29720    type Message = MavMessage;
29721    const ID: u32 = 134u32;
29722    const NAME: &'static str = "TERRAIN_DATA";
29723    const EXTRA_CRC: u8 = 229u8;
29724    const ENCODED_LEN: usize = 43usize;
29725    fn deser(
29726        _version: MavlinkVersion,
29727        __input: &[u8],
29728    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29729        let avail_len = __input.len();
29730        let mut payload_buf = [0; Self::ENCODED_LEN];
29731        let mut buf = if avail_len < Self::ENCODED_LEN {
29732            payload_buf[0..avail_len].copy_from_slice(__input);
29733            Bytes::new(&payload_buf)
29734        } else {
29735            Bytes::new(__input)
29736        };
29737        let mut __struct = Self::default();
29738        __struct.lat = buf.get_i32_le()?;
29739        __struct.lon = buf.get_i32_le()?;
29740        __struct.grid_spacing = buf.get_u16_le()?;
29741        for v in &mut __struct.data {
29742            let val = buf.get_i16_le()?;
29743            *v = val;
29744        }
29745        __struct.gridbit = buf.get_u8()?;
29746        Ok(__struct)
29747    }
29748    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29749        let mut __tmp = BytesMut::new(bytes);
29750        #[allow(clippy::absurd_extreme_comparisons)]
29751        #[allow(unused_comparisons)]
29752        if __tmp.remaining() < Self::ENCODED_LEN {
29753            panic!(
29754                "buffer is too small (need {} bytes, but got {})",
29755                Self::ENCODED_LEN,
29756                __tmp.remaining(),
29757            )
29758        }
29759        __tmp.put_i32_le(self.lat);
29760        __tmp.put_i32_le(self.lon);
29761        __tmp.put_u16_le(self.grid_spacing);
29762        for val in &self.data {
29763            __tmp.put_i16_le(*val);
29764        }
29765        __tmp.put_u8(self.gridbit);
29766        if matches!(version, MavlinkVersion::V2) {
29767            let len = __tmp.len();
29768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29769        } else {
29770            __tmp.len()
29771        }
29772    }
29773}
29774#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29775#[doc = ""]
29776#[doc = "ID: 136"]
29777#[derive(Debug, Clone, PartialEq)]
29778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29780#[cfg_attr(feature = "ts", derive(TS))]
29781#[cfg_attr(feature = "ts", ts(export))]
29782pub struct TERRAIN_REPORT_DATA {
29783    #[doc = "Latitude"]
29784    pub lat: i32,
29785    #[doc = "Longitude"]
29786    pub lon: i32,
29787    #[doc = "Terrain height MSL"]
29788    pub terrain_height: f32,
29789    #[doc = "Current vehicle height above lat/lon terrain height"]
29790    pub current_height: f32,
29791    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29792    pub spacing: u16,
29793    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29794    pub pending: u16,
29795    #[doc = "Number of 4x4 terrain blocks in memory"]
29796    pub loaded: u16,
29797}
29798impl TERRAIN_REPORT_DATA {
29799    pub const ENCODED_LEN: usize = 22usize;
29800    pub const DEFAULT: Self = Self {
29801        lat: 0_i32,
29802        lon: 0_i32,
29803        terrain_height: 0.0_f32,
29804        current_height: 0.0_f32,
29805        spacing: 0_u16,
29806        pending: 0_u16,
29807        loaded: 0_u16,
29808    };
29809    #[cfg(feature = "arbitrary")]
29810    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29811        use arbitrary::{Arbitrary, Unstructured};
29812        let mut buf = [0u8; 1024];
29813        rng.fill_bytes(&mut buf);
29814        let mut unstructured = Unstructured::new(&buf);
29815        Self::arbitrary(&mut unstructured).unwrap_or_default()
29816    }
29817}
29818impl Default for TERRAIN_REPORT_DATA {
29819    fn default() -> Self {
29820        Self::DEFAULT.clone()
29821    }
29822}
29823impl MessageData for TERRAIN_REPORT_DATA {
29824    type Message = MavMessage;
29825    const ID: u32 = 136u32;
29826    const NAME: &'static str = "TERRAIN_REPORT";
29827    const EXTRA_CRC: u8 = 1u8;
29828    const ENCODED_LEN: usize = 22usize;
29829    fn deser(
29830        _version: MavlinkVersion,
29831        __input: &[u8],
29832    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29833        let avail_len = __input.len();
29834        let mut payload_buf = [0; Self::ENCODED_LEN];
29835        let mut buf = if avail_len < Self::ENCODED_LEN {
29836            payload_buf[0..avail_len].copy_from_slice(__input);
29837            Bytes::new(&payload_buf)
29838        } else {
29839            Bytes::new(__input)
29840        };
29841        let mut __struct = Self::default();
29842        __struct.lat = buf.get_i32_le()?;
29843        __struct.lon = buf.get_i32_le()?;
29844        __struct.terrain_height = buf.get_f32_le()?;
29845        __struct.current_height = buf.get_f32_le()?;
29846        __struct.spacing = buf.get_u16_le()?;
29847        __struct.pending = buf.get_u16_le()?;
29848        __struct.loaded = buf.get_u16_le()?;
29849        Ok(__struct)
29850    }
29851    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29852        let mut __tmp = BytesMut::new(bytes);
29853        #[allow(clippy::absurd_extreme_comparisons)]
29854        #[allow(unused_comparisons)]
29855        if __tmp.remaining() < Self::ENCODED_LEN {
29856            panic!(
29857                "buffer is too small (need {} bytes, but got {})",
29858                Self::ENCODED_LEN,
29859                __tmp.remaining(),
29860            )
29861        }
29862        __tmp.put_i32_le(self.lat);
29863        __tmp.put_i32_le(self.lon);
29864        __tmp.put_f32_le(self.terrain_height);
29865        __tmp.put_f32_le(self.current_height);
29866        __tmp.put_u16_le(self.spacing);
29867        __tmp.put_u16_le(self.pending);
29868        __tmp.put_u16_le(self.loaded);
29869        if matches!(version, MavlinkVersion::V2) {
29870            let len = __tmp.len();
29871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29872        } else {
29873            __tmp.len()
29874        }
29875    }
29876}
29877#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29878#[doc = ""]
29879#[doc = "ID: 133"]
29880#[derive(Debug, Clone, PartialEq)]
29881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29883#[cfg_attr(feature = "ts", derive(TS))]
29884#[cfg_attr(feature = "ts", ts(export))]
29885pub struct TERRAIN_REQUEST_DATA {
29886    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29887    pub mask: u64,
29888    #[doc = "Latitude of SW corner of first grid"]
29889    pub lat: i32,
29890    #[doc = "Longitude of SW corner of first grid"]
29891    pub lon: i32,
29892    #[doc = "Grid spacing"]
29893    pub grid_spacing: u16,
29894}
29895impl TERRAIN_REQUEST_DATA {
29896    pub const ENCODED_LEN: usize = 18usize;
29897    pub const DEFAULT: Self = Self {
29898        mask: 0_u64,
29899        lat: 0_i32,
29900        lon: 0_i32,
29901        grid_spacing: 0_u16,
29902    };
29903    #[cfg(feature = "arbitrary")]
29904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29905        use arbitrary::{Arbitrary, Unstructured};
29906        let mut buf = [0u8; 1024];
29907        rng.fill_bytes(&mut buf);
29908        let mut unstructured = Unstructured::new(&buf);
29909        Self::arbitrary(&mut unstructured).unwrap_or_default()
29910    }
29911}
29912impl Default for TERRAIN_REQUEST_DATA {
29913    fn default() -> Self {
29914        Self::DEFAULT.clone()
29915    }
29916}
29917impl MessageData for TERRAIN_REQUEST_DATA {
29918    type Message = MavMessage;
29919    const ID: u32 = 133u32;
29920    const NAME: &'static str = "TERRAIN_REQUEST";
29921    const EXTRA_CRC: u8 = 6u8;
29922    const ENCODED_LEN: usize = 18usize;
29923    fn deser(
29924        _version: MavlinkVersion,
29925        __input: &[u8],
29926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29927        let avail_len = __input.len();
29928        let mut payload_buf = [0; Self::ENCODED_LEN];
29929        let mut buf = if avail_len < Self::ENCODED_LEN {
29930            payload_buf[0..avail_len].copy_from_slice(__input);
29931            Bytes::new(&payload_buf)
29932        } else {
29933            Bytes::new(__input)
29934        };
29935        let mut __struct = Self::default();
29936        __struct.mask = buf.get_u64_le()?;
29937        __struct.lat = buf.get_i32_le()?;
29938        __struct.lon = buf.get_i32_le()?;
29939        __struct.grid_spacing = buf.get_u16_le()?;
29940        Ok(__struct)
29941    }
29942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29943        let mut __tmp = BytesMut::new(bytes);
29944        #[allow(clippy::absurd_extreme_comparisons)]
29945        #[allow(unused_comparisons)]
29946        if __tmp.remaining() < Self::ENCODED_LEN {
29947            panic!(
29948                "buffer is too small (need {} bytes, but got {})",
29949                Self::ENCODED_LEN,
29950                __tmp.remaining(),
29951            )
29952        }
29953        __tmp.put_u64_le(self.mask);
29954        __tmp.put_i32_le(self.lat);
29955        __tmp.put_i32_le(self.lon);
29956        __tmp.put_u16_le(self.grid_spacing);
29957        if matches!(version, MavlinkVersion::V2) {
29958            let len = __tmp.len();
29959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29960        } else {
29961            __tmp.len()
29962        }
29963    }
29964}
29965#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
29966#[doc = ""]
29967#[doc = "ID: 111"]
29968#[derive(Debug, Clone, PartialEq)]
29969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29971#[cfg_attr(feature = "ts", derive(TS))]
29972#[cfg_attr(feature = "ts", ts(export))]
29973pub struct TIMESYNC_DATA {
29974    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
29975    pub tc1: i64,
29976    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
29977    pub ts1: i64,
29978    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
29979    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29980    pub target_system: u8,
29981    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
29982    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29983    pub target_component: u8,
29984}
29985impl TIMESYNC_DATA {
29986    pub const ENCODED_LEN: usize = 18usize;
29987    pub const DEFAULT: Self = Self {
29988        tc1: 0_i64,
29989        ts1: 0_i64,
29990        target_system: 0_u8,
29991        target_component: 0_u8,
29992    };
29993    #[cfg(feature = "arbitrary")]
29994    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29995        use arbitrary::{Arbitrary, Unstructured};
29996        let mut buf = [0u8; 1024];
29997        rng.fill_bytes(&mut buf);
29998        let mut unstructured = Unstructured::new(&buf);
29999        Self::arbitrary(&mut unstructured).unwrap_or_default()
30000    }
30001}
30002impl Default for TIMESYNC_DATA {
30003    fn default() -> Self {
30004        Self::DEFAULT.clone()
30005    }
30006}
30007impl MessageData for TIMESYNC_DATA {
30008    type Message = MavMessage;
30009    const ID: u32 = 111u32;
30010    const NAME: &'static str = "TIMESYNC";
30011    const EXTRA_CRC: u8 = 34u8;
30012    const ENCODED_LEN: usize = 18usize;
30013    fn deser(
30014        _version: MavlinkVersion,
30015        __input: &[u8],
30016    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30017        let avail_len = __input.len();
30018        let mut payload_buf = [0; Self::ENCODED_LEN];
30019        let mut buf = if avail_len < Self::ENCODED_LEN {
30020            payload_buf[0..avail_len].copy_from_slice(__input);
30021            Bytes::new(&payload_buf)
30022        } else {
30023            Bytes::new(__input)
30024        };
30025        let mut __struct = Self::default();
30026        __struct.tc1 = buf.get_i64_le()?;
30027        __struct.ts1 = buf.get_i64_le()?;
30028        __struct.target_system = buf.get_u8()?;
30029        __struct.target_component = buf.get_u8()?;
30030        Ok(__struct)
30031    }
30032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30033        let mut __tmp = BytesMut::new(bytes);
30034        #[allow(clippy::absurd_extreme_comparisons)]
30035        #[allow(unused_comparisons)]
30036        if __tmp.remaining() < Self::ENCODED_LEN {
30037            panic!(
30038                "buffer is too small (need {} bytes, but got {})",
30039                Self::ENCODED_LEN,
30040                __tmp.remaining(),
30041            )
30042        }
30043        __tmp.put_i64_le(self.tc1);
30044        __tmp.put_i64_le(self.ts1);
30045        if matches!(version, MavlinkVersion::V2) {
30046            __tmp.put_u8(self.target_system);
30047            __tmp.put_u8(self.target_component);
30048            let len = __tmp.len();
30049            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30050        } else {
30051            __tmp.len()
30052        }
30053    }
30054}
30055#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30056#[doc = ""]
30057#[doc = "ID: 380"]
30058#[derive(Debug, Clone, PartialEq)]
30059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30061#[cfg_attr(feature = "ts", derive(TS))]
30062#[cfg_attr(feature = "ts", ts(export))]
30063pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30064    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30065    pub safe_return: i32,
30066    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30067    pub land: i32,
30068    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30069    pub mission_next_item: i32,
30070    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30071    pub mission_end: i32,
30072    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30073    pub commanded_action: i32,
30074}
30075impl TIME_ESTIMATE_TO_TARGET_DATA {
30076    pub const ENCODED_LEN: usize = 20usize;
30077    pub const DEFAULT: Self = Self {
30078        safe_return: 0_i32,
30079        land: 0_i32,
30080        mission_next_item: 0_i32,
30081        mission_end: 0_i32,
30082        commanded_action: 0_i32,
30083    };
30084    #[cfg(feature = "arbitrary")]
30085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30086        use arbitrary::{Arbitrary, Unstructured};
30087        let mut buf = [0u8; 1024];
30088        rng.fill_bytes(&mut buf);
30089        let mut unstructured = Unstructured::new(&buf);
30090        Self::arbitrary(&mut unstructured).unwrap_or_default()
30091    }
30092}
30093impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30094    fn default() -> Self {
30095        Self::DEFAULT.clone()
30096    }
30097}
30098impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30099    type Message = MavMessage;
30100    const ID: u32 = 380u32;
30101    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30102    const EXTRA_CRC: u8 = 232u8;
30103    const ENCODED_LEN: usize = 20usize;
30104    fn deser(
30105        _version: MavlinkVersion,
30106        __input: &[u8],
30107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30108        let avail_len = __input.len();
30109        let mut payload_buf = [0; Self::ENCODED_LEN];
30110        let mut buf = if avail_len < Self::ENCODED_LEN {
30111            payload_buf[0..avail_len].copy_from_slice(__input);
30112            Bytes::new(&payload_buf)
30113        } else {
30114            Bytes::new(__input)
30115        };
30116        let mut __struct = Self::default();
30117        __struct.safe_return = buf.get_i32_le()?;
30118        __struct.land = buf.get_i32_le()?;
30119        __struct.mission_next_item = buf.get_i32_le()?;
30120        __struct.mission_end = buf.get_i32_le()?;
30121        __struct.commanded_action = buf.get_i32_le()?;
30122        Ok(__struct)
30123    }
30124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30125        let mut __tmp = BytesMut::new(bytes);
30126        #[allow(clippy::absurd_extreme_comparisons)]
30127        #[allow(unused_comparisons)]
30128        if __tmp.remaining() < Self::ENCODED_LEN {
30129            panic!(
30130                "buffer is too small (need {} bytes, but got {})",
30131                Self::ENCODED_LEN,
30132                __tmp.remaining(),
30133            )
30134        }
30135        __tmp.put_i32_le(self.safe_return);
30136        __tmp.put_i32_le(self.land);
30137        __tmp.put_i32_le(self.mission_next_item);
30138        __tmp.put_i32_le(self.mission_end);
30139        __tmp.put_i32_le(self.commanded_action);
30140        if matches!(version, MavlinkVersion::V2) {
30141            let len = __tmp.len();
30142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30143        } else {
30144            __tmp.len()
30145        }
30146    }
30147}
30148#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30149#[doc = ""]
30150#[doc = "ID: 333"]
30151#[derive(Debug, Clone, PartialEq)]
30152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30154#[cfg_attr(feature = "ts", derive(TS))]
30155#[cfg_attr(feature = "ts", ts(export))]
30156pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30157    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30158    pub time_usec: u64,
30159    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30160    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30161    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30162    pub pos_x: [f32; 5],
30163    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30164    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30165    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30166    pub pos_y: [f32; 5],
30167    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30168    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30169    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30170    pub pos_z: [f32; 5],
30171    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30172    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30173    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30174    pub delta: [f32; 5],
30175    #[doc = "Yaw. Set to NaN for unchanged"]
30176    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30177    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30178    pub pos_yaw: [f32; 5],
30179    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30180    pub valid_points: u8,
30181}
30182impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30183    pub const ENCODED_LEN: usize = 109usize;
30184    pub const DEFAULT: Self = Self {
30185        time_usec: 0_u64,
30186        pos_x: [0.0_f32; 5usize],
30187        pos_y: [0.0_f32; 5usize],
30188        pos_z: [0.0_f32; 5usize],
30189        delta: [0.0_f32; 5usize],
30190        pos_yaw: [0.0_f32; 5usize],
30191        valid_points: 0_u8,
30192    };
30193    #[cfg(feature = "arbitrary")]
30194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30195        use arbitrary::{Arbitrary, Unstructured};
30196        let mut buf = [0u8; 1024];
30197        rng.fill_bytes(&mut buf);
30198        let mut unstructured = Unstructured::new(&buf);
30199        Self::arbitrary(&mut unstructured).unwrap_or_default()
30200    }
30201}
30202impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30203    fn default() -> Self {
30204        Self::DEFAULT.clone()
30205    }
30206}
30207impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30208    type Message = MavMessage;
30209    const ID: u32 = 333u32;
30210    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30211    const EXTRA_CRC: u8 = 231u8;
30212    const ENCODED_LEN: usize = 109usize;
30213    fn deser(
30214        _version: MavlinkVersion,
30215        __input: &[u8],
30216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30217        let avail_len = __input.len();
30218        let mut payload_buf = [0; Self::ENCODED_LEN];
30219        let mut buf = if avail_len < Self::ENCODED_LEN {
30220            payload_buf[0..avail_len].copy_from_slice(__input);
30221            Bytes::new(&payload_buf)
30222        } else {
30223            Bytes::new(__input)
30224        };
30225        let mut __struct = Self::default();
30226        __struct.time_usec = buf.get_u64_le()?;
30227        for v in &mut __struct.pos_x {
30228            let val = buf.get_f32_le()?;
30229            *v = val;
30230        }
30231        for v in &mut __struct.pos_y {
30232            let val = buf.get_f32_le()?;
30233            *v = val;
30234        }
30235        for v in &mut __struct.pos_z {
30236            let val = buf.get_f32_le()?;
30237            *v = val;
30238        }
30239        for v in &mut __struct.delta {
30240            let val = buf.get_f32_le()?;
30241            *v = val;
30242        }
30243        for v in &mut __struct.pos_yaw {
30244            let val = buf.get_f32_le()?;
30245            *v = val;
30246        }
30247        __struct.valid_points = buf.get_u8()?;
30248        Ok(__struct)
30249    }
30250    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30251        let mut __tmp = BytesMut::new(bytes);
30252        #[allow(clippy::absurd_extreme_comparisons)]
30253        #[allow(unused_comparisons)]
30254        if __tmp.remaining() < Self::ENCODED_LEN {
30255            panic!(
30256                "buffer is too small (need {} bytes, but got {})",
30257                Self::ENCODED_LEN,
30258                __tmp.remaining(),
30259            )
30260        }
30261        __tmp.put_u64_le(self.time_usec);
30262        for val in &self.pos_x {
30263            __tmp.put_f32_le(*val);
30264        }
30265        for val in &self.pos_y {
30266            __tmp.put_f32_le(*val);
30267        }
30268        for val in &self.pos_z {
30269            __tmp.put_f32_le(*val);
30270        }
30271        for val in &self.delta {
30272            __tmp.put_f32_le(*val);
30273        }
30274        for val in &self.pos_yaw {
30275            __tmp.put_f32_le(*val);
30276        }
30277        __tmp.put_u8(self.valid_points);
30278        if matches!(version, MavlinkVersion::V2) {
30279            let len = __tmp.len();
30280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30281        } else {
30282            __tmp.len()
30283        }
30284    }
30285}
30286#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30287#[doc = ""]
30288#[doc = "ID: 332"]
30289#[derive(Debug, Clone, PartialEq)]
30290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30292#[cfg_attr(feature = "ts", derive(TS))]
30293#[cfg_attr(feature = "ts", ts(export))]
30294pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30295    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30296    pub time_usec: u64,
30297    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30298    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30299    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30300    pub pos_x: [f32; 5],
30301    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30302    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30303    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30304    pub pos_y: [f32; 5],
30305    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30306    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30307    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30308    pub pos_z: [f32; 5],
30309    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30310    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30311    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30312    pub vel_x: [f32; 5],
30313    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30314    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30315    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30316    pub vel_y: [f32; 5],
30317    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30318    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30319    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30320    pub vel_z: [f32; 5],
30321    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30322    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30323    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30324    pub acc_x: [f32; 5],
30325    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30326    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30327    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30328    pub acc_y: [f32; 5],
30329    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30330    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30331    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30332    pub acc_z: [f32; 5],
30333    #[doc = "Yaw angle, set to NaN if not being used"]
30334    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30335    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30336    pub pos_yaw: [f32; 5],
30337    #[doc = "Yaw rate, set to NaN if not being used"]
30338    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30339    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30340    pub vel_yaw: [f32; 5],
30341    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30343    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30344    pub command: [u16; 5],
30345    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30346    pub valid_points: u8,
30347}
30348impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30349    pub const ENCODED_LEN: usize = 239usize;
30350    pub const DEFAULT: Self = Self {
30351        time_usec: 0_u64,
30352        pos_x: [0.0_f32; 5usize],
30353        pos_y: [0.0_f32; 5usize],
30354        pos_z: [0.0_f32; 5usize],
30355        vel_x: [0.0_f32; 5usize],
30356        vel_y: [0.0_f32; 5usize],
30357        vel_z: [0.0_f32; 5usize],
30358        acc_x: [0.0_f32; 5usize],
30359        acc_y: [0.0_f32; 5usize],
30360        acc_z: [0.0_f32; 5usize],
30361        pos_yaw: [0.0_f32; 5usize],
30362        vel_yaw: [0.0_f32; 5usize],
30363        command: [0_u16; 5usize],
30364        valid_points: 0_u8,
30365    };
30366    #[cfg(feature = "arbitrary")]
30367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30368        use arbitrary::{Arbitrary, Unstructured};
30369        let mut buf = [0u8; 1024];
30370        rng.fill_bytes(&mut buf);
30371        let mut unstructured = Unstructured::new(&buf);
30372        Self::arbitrary(&mut unstructured).unwrap_or_default()
30373    }
30374}
30375impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30376    fn default() -> Self {
30377        Self::DEFAULT.clone()
30378    }
30379}
30380impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30381    type Message = MavMessage;
30382    const ID: u32 = 332u32;
30383    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30384    const EXTRA_CRC: u8 = 236u8;
30385    const ENCODED_LEN: usize = 239usize;
30386    fn deser(
30387        _version: MavlinkVersion,
30388        __input: &[u8],
30389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30390        let avail_len = __input.len();
30391        let mut payload_buf = [0; Self::ENCODED_LEN];
30392        let mut buf = if avail_len < Self::ENCODED_LEN {
30393            payload_buf[0..avail_len].copy_from_slice(__input);
30394            Bytes::new(&payload_buf)
30395        } else {
30396            Bytes::new(__input)
30397        };
30398        let mut __struct = Self::default();
30399        __struct.time_usec = buf.get_u64_le()?;
30400        for v in &mut __struct.pos_x {
30401            let val = buf.get_f32_le()?;
30402            *v = val;
30403        }
30404        for v in &mut __struct.pos_y {
30405            let val = buf.get_f32_le()?;
30406            *v = val;
30407        }
30408        for v in &mut __struct.pos_z {
30409            let val = buf.get_f32_le()?;
30410            *v = val;
30411        }
30412        for v in &mut __struct.vel_x {
30413            let val = buf.get_f32_le()?;
30414            *v = val;
30415        }
30416        for v in &mut __struct.vel_y {
30417            let val = buf.get_f32_le()?;
30418            *v = val;
30419        }
30420        for v in &mut __struct.vel_z {
30421            let val = buf.get_f32_le()?;
30422            *v = val;
30423        }
30424        for v in &mut __struct.acc_x {
30425            let val = buf.get_f32_le()?;
30426            *v = val;
30427        }
30428        for v in &mut __struct.acc_y {
30429            let val = buf.get_f32_le()?;
30430            *v = val;
30431        }
30432        for v in &mut __struct.acc_z {
30433            let val = buf.get_f32_le()?;
30434            *v = val;
30435        }
30436        for v in &mut __struct.pos_yaw {
30437            let val = buf.get_f32_le()?;
30438            *v = val;
30439        }
30440        for v in &mut __struct.vel_yaw {
30441            let val = buf.get_f32_le()?;
30442            *v = val;
30443        }
30444        for v in &mut __struct.command {
30445            let val = buf.get_u16_le()?;
30446            *v = val;
30447        }
30448        __struct.valid_points = buf.get_u8()?;
30449        Ok(__struct)
30450    }
30451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30452        let mut __tmp = BytesMut::new(bytes);
30453        #[allow(clippy::absurd_extreme_comparisons)]
30454        #[allow(unused_comparisons)]
30455        if __tmp.remaining() < Self::ENCODED_LEN {
30456            panic!(
30457                "buffer is too small (need {} bytes, but got {})",
30458                Self::ENCODED_LEN,
30459                __tmp.remaining(),
30460            )
30461        }
30462        __tmp.put_u64_le(self.time_usec);
30463        for val in &self.pos_x {
30464            __tmp.put_f32_le(*val);
30465        }
30466        for val in &self.pos_y {
30467            __tmp.put_f32_le(*val);
30468        }
30469        for val in &self.pos_z {
30470            __tmp.put_f32_le(*val);
30471        }
30472        for val in &self.vel_x {
30473            __tmp.put_f32_le(*val);
30474        }
30475        for val in &self.vel_y {
30476            __tmp.put_f32_le(*val);
30477        }
30478        for val in &self.vel_z {
30479            __tmp.put_f32_le(*val);
30480        }
30481        for val in &self.acc_x {
30482            __tmp.put_f32_le(*val);
30483        }
30484        for val in &self.acc_y {
30485            __tmp.put_f32_le(*val);
30486        }
30487        for val in &self.acc_z {
30488            __tmp.put_f32_le(*val);
30489        }
30490        for val in &self.pos_yaw {
30491            __tmp.put_f32_le(*val);
30492        }
30493        for val in &self.vel_yaw {
30494            __tmp.put_f32_le(*val);
30495        }
30496        for val in &self.command {
30497            __tmp.put_u16_le(*val);
30498        }
30499        __tmp.put_u8(self.valid_points);
30500        if matches!(version, MavlinkVersion::V2) {
30501            let len = __tmp.len();
30502            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30503        } else {
30504            __tmp.len()
30505        }
30506    }
30507}
30508#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30509#[doc = ""]
30510#[doc = "ID: 385"]
30511#[derive(Debug, Clone, PartialEq)]
30512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30514#[cfg_attr(feature = "ts", derive(TS))]
30515#[cfg_attr(feature = "ts", ts(export))]
30516pub struct TUNNEL_DATA {
30517    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30518    pub payload_type: MavTunnelPayloadType,
30519    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30520    pub target_system: u8,
30521    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30522    pub target_component: u8,
30523    #[doc = "Length of the data transported in payload"]
30524    pub payload_length: u8,
30525    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30526    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30527    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30528    pub payload: [u8; 128],
30529}
30530impl TUNNEL_DATA {
30531    pub const ENCODED_LEN: usize = 133usize;
30532    pub const DEFAULT: Self = Self {
30533        payload_type: MavTunnelPayloadType::DEFAULT,
30534        target_system: 0_u8,
30535        target_component: 0_u8,
30536        payload_length: 0_u8,
30537        payload: [0_u8; 128usize],
30538    };
30539    #[cfg(feature = "arbitrary")]
30540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30541        use arbitrary::{Arbitrary, Unstructured};
30542        let mut buf = [0u8; 1024];
30543        rng.fill_bytes(&mut buf);
30544        let mut unstructured = Unstructured::new(&buf);
30545        Self::arbitrary(&mut unstructured).unwrap_or_default()
30546    }
30547}
30548impl Default for TUNNEL_DATA {
30549    fn default() -> Self {
30550        Self::DEFAULT.clone()
30551    }
30552}
30553impl MessageData for TUNNEL_DATA {
30554    type Message = MavMessage;
30555    const ID: u32 = 385u32;
30556    const NAME: &'static str = "TUNNEL";
30557    const EXTRA_CRC: u8 = 147u8;
30558    const ENCODED_LEN: usize = 133usize;
30559    fn deser(
30560        _version: MavlinkVersion,
30561        __input: &[u8],
30562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30563        let avail_len = __input.len();
30564        let mut payload_buf = [0; Self::ENCODED_LEN];
30565        let mut buf = if avail_len < Self::ENCODED_LEN {
30566            payload_buf[0..avail_len].copy_from_slice(__input);
30567            Bytes::new(&payload_buf)
30568        } else {
30569            Bytes::new(__input)
30570        };
30571        let mut __struct = Self::default();
30572        let tmp = buf.get_u16_le()?;
30573        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30574            ::mavlink_core::error::ParserError::InvalidEnum {
30575                enum_type: "MavTunnelPayloadType",
30576                value: tmp as u64,
30577            },
30578        )?;
30579        __struct.target_system = buf.get_u8()?;
30580        __struct.target_component = buf.get_u8()?;
30581        __struct.payload_length = buf.get_u8()?;
30582        for v in &mut __struct.payload {
30583            let val = buf.get_u8()?;
30584            *v = val;
30585        }
30586        Ok(__struct)
30587    }
30588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30589        let mut __tmp = BytesMut::new(bytes);
30590        #[allow(clippy::absurd_extreme_comparisons)]
30591        #[allow(unused_comparisons)]
30592        if __tmp.remaining() < Self::ENCODED_LEN {
30593            panic!(
30594                "buffer is too small (need {} bytes, but got {})",
30595                Self::ENCODED_LEN,
30596                __tmp.remaining(),
30597            )
30598        }
30599        __tmp.put_u16_le(self.payload_type as u16);
30600        __tmp.put_u8(self.target_system);
30601        __tmp.put_u8(self.target_component);
30602        __tmp.put_u8(self.payload_length);
30603        for val in &self.payload {
30604            __tmp.put_u8(*val);
30605        }
30606        if matches!(version, MavlinkVersion::V2) {
30607            let len = __tmp.len();
30608            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30609        } else {
30610            __tmp.len()
30611        }
30612    }
30613}
30614#[doc = "System status specific to ualberta uav."]
30615#[doc = ""]
30616#[doc = "ID: 222"]
30617#[derive(Debug, Clone, PartialEq)]
30618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30620#[cfg_attr(feature = "ts", derive(TS))]
30621#[cfg_attr(feature = "ts", ts(export))]
30622pub struct UALBERTA_SYS_STATUS_DATA {
30623    #[doc = "System mode, see UALBERTA_AUTOPILOT_MODE ENUM"]
30624    pub mode: u8,
30625    #[doc = "Navigation mode, see UALBERTA_NAV_MODE ENUM"]
30626    pub nav_mode: u8,
30627    #[doc = "Pilot mode, see UALBERTA_PILOT_MODE"]
30628    pub pilot: u8,
30629}
30630impl UALBERTA_SYS_STATUS_DATA {
30631    pub const ENCODED_LEN: usize = 3usize;
30632    pub const DEFAULT: Self = Self {
30633        mode: 0_u8,
30634        nav_mode: 0_u8,
30635        pilot: 0_u8,
30636    };
30637    #[cfg(feature = "arbitrary")]
30638    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30639        use arbitrary::{Arbitrary, Unstructured};
30640        let mut buf = [0u8; 1024];
30641        rng.fill_bytes(&mut buf);
30642        let mut unstructured = Unstructured::new(&buf);
30643        Self::arbitrary(&mut unstructured).unwrap_or_default()
30644    }
30645}
30646impl Default for UALBERTA_SYS_STATUS_DATA {
30647    fn default() -> Self {
30648        Self::DEFAULT.clone()
30649    }
30650}
30651impl MessageData for UALBERTA_SYS_STATUS_DATA {
30652    type Message = MavMessage;
30653    const ID: u32 = 222u32;
30654    const NAME: &'static str = "UALBERTA_SYS_STATUS";
30655    const EXTRA_CRC: u8 = 15u8;
30656    const ENCODED_LEN: usize = 3usize;
30657    fn deser(
30658        _version: MavlinkVersion,
30659        __input: &[u8],
30660    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30661        let avail_len = __input.len();
30662        let mut payload_buf = [0; Self::ENCODED_LEN];
30663        let mut buf = if avail_len < Self::ENCODED_LEN {
30664            payload_buf[0..avail_len].copy_from_slice(__input);
30665            Bytes::new(&payload_buf)
30666        } else {
30667            Bytes::new(__input)
30668        };
30669        let mut __struct = Self::default();
30670        __struct.mode = buf.get_u8()?;
30671        __struct.nav_mode = buf.get_u8()?;
30672        __struct.pilot = buf.get_u8()?;
30673        Ok(__struct)
30674    }
30675    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30676        let mut __tmp = BytesMut::new(bytes);
30677        #[allow(clippy::absurd_extreme_comparisons)]
30678        #[allow(unused_comparisons)]
30679        if __tmp.remaining() < Self::ENCODED_LEN {
30680            panic!(
30681                "buffer is too small (need {} bytes, but got {})",
30682                Self::ENCODED_LEN,
30683                __tmp.remaining(),
30684            )
30685        }
30686        __tmp.put_u8(self.mode);
30687        __tmp.put_u8(self.nav_mode);
30688        __tmp.put_u8(self.pilot);
30689        if matches!(version, MavlinkVersion::V2) {
30690            let len = __tmp.len();
30691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30692        } else {
30693            __tmp.len()
30694        }
30695    }
30696}
30697#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30698#[doc = ""]
30699#[doc = "ID: 311"]
30700#[derive(Debug, Clone, PartialEq)]
30701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30703#[cfg_attr(feature = "ts", derive(TS))]
30704#[cfg_attr(feature = "ts", ts(export))]
30705pub struct UAVCAN_NODE_INFO_DATA {
30706    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30707    pub time_usec: u64,
30708    #[doc = "Time since the start-up of the node."]
30709    pub uptime_sec: u32,
30710    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30711    pub sw_vcs_commit: u32,
30712    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30713    #[cfg_attr(feature = "ts", ts(type = "string"))]
30714    pub name: CharArray<80>,
30715    #[doc = "Hardware major version number."]
30716    pub hw_version_major: u8,
30717    #[doc = "Hardware minor version number."]
30718    pub hw_version_minor: u8,
30719    #[doc = "Hardware unique 128-bit ID."]
30720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30721    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30722    pub hw_unique_id: [u8; 16],
30723    #[doc = "Software major version number."]
30724    pub sw_version_major: u8,
30725    #[doc = "Software minor version number."]
30726    pub sw_version_minor: u8,
30727}
30728impl UAVCAN_NODE_INFO_DATA {
30729    pub const ENCODED_LEN: usize = 116usize;
30730    pub const DEFAULT: Self = Self {
30731        time_usec: 0_u64,
30732        uptime_sec: 0_u32,
30733        sw_vcs_commit: 0_u32,
30734        name: CharArray::new([0_u8; 80usize]),
30735        hw_version_major: 0_u8,
30736        hw_version_minor: 0_u8,
30737        hw_unique_id: [0_u8; 16usize],
30738        sw_version_major: 0_u8,
30739        sw_version_minor: 0_u8,
30740    };
30741    #[cfg(feature = "arbitrary")]
30742    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30743        use arbitrary::{Arbitrary, Unstructured};
30744        let mut buf = [0u8; 1024];
30745        rng.fill_bytes(&mut buf);
30746        let mut unstructured = Unstructured::new(&buf);
30747        Self::arbitrary(&mut unstructured).unwrap_or_default()
30748    }
30749}
30750impl Default for UAVCAN_NODE_INFO_DATA {
30751    fn default() -> Self {
30752        Self::DEFAULT.clone()
30753    }
30754}
30755impl MessageData for UAVCAN_NODE_INFO_DATA {
30756    type Message = MavMessage;
30757    const ID: u32 = 311u32;
30758    const NAME: &'static str = "UAVCAN_NODE_INFO";
30759    const EXTRA_CRC: u8 = 95u8;
30760    const ENCODED_LEN: usize = 116usize;
30761    fn deser(
30762        _version: MavlinkVersion,
30763        __input: &[u8],
30764    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30765        let avail_len = __input.len();
30766        let mut payload_buf = [0; Self::ENCODED_LEN];
30767        let mut buf = if avail_len < Self::ENCODED_LEN {
30768            payload_buf[0..avail_len].copy_from_slice(__input);
30769            Bytes::new(&payload_buf)
30770        } else {
30771            Bytes::new(__input)
30772        };
30773        let mut __struct = Self::default();
30774        __struct.time_usec = buf.get_u64_le()?;
30775        __struct.uptime_sec = buf.get_u32_le()?;
30776        __struct.sw_vcs_commit = buf.get_u32_le()?;
30777        let mut tmp = [0_u8; 80usize];
30778        for v in &mut tmp {
30779            *v = buf.get_u8()?;
30780        }
30781        __struct.name = CharArray::new(tmp);
30782        __struct.hw_version_major = buf.get_u8()?;
30783        __struct.hw_version_minor = buf.get_u8()?;
30784        for v in &mut __struct.hw_unique_id {
30785            let val = buf.get_u8()?;
30786            *v = val;
30787        }
30788        __struct.sw_version_major = buf.get_u8()?;
30789        __struct.sw_version_minor = buf.get_u8()?;
30790        Ok(__struct)
30791    }
30792    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30793        let mut __tmp = BytesMut::new(bytes);
30794        #[allow(clippy::absurd_extreme_comparisons)]
30795        #[allow(unused_comparisons)]
30796        if __tmp.remaining() < Self::ENCODED_LEN {
30797            panic!(
30798                "buffer is too small (need {} bytes, but got {})",
30799                Self::ENCODED_LEN,
30800                __tmp.remaining(),
30801            )
30802        }
30803        __tmp.put_u64_le(self.time_usec);
30804        __tmp.put_u32_le(self.uptime_sec);
30805        __tmp.put_u32_le(self.sw_vcs_commit);
30806        for val in &self.name {
30807            __tmp.put_u8(*val);
30808        }
30809        __tmp.put_u8(self.hw_version_major);
30810        __tmp.put_u8(self.hw_version_minor);
30811        for val in &self.hw_unique_id {
30812            __tmp.put_u8(*val);
30813        }
30814        __tmp.put_u8(self.sw_version_major);
30815        __tmp.put_u8(self.sw_version_minor);
30816        if matches!(version, MavlinkVersion::V2) {
30817            let len = __tmp.len();
30818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30819        } else {
30820            __tmp.len()
30821        }
30822    }
30823}
30824#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30825#[doc = ""]
30826#[doc = "ID: 310"]
30827#[derive(Debug, Clone, PartialEq)]
30828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30830#[cfg_attr(feature = "ts", derive(TS))]
30831#[cfg_attr(feature = "ts", ts(export))]
30832pub struct UAVCAN_NODE_STATUS_DATA {
30833    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30834    pub time_usec: u64,
30835    #[doc = "Time since the start-up of the node."]
30836    pub uptime_sec: u32,
30837    #[doc = "Vendor-specific status information."]
30838    pub vendor_specific_status_code: u16,
30839    #[doc = "Generalized node health status."]
30840    pub health: UavcanNodeHealth,
30841    #[doc = "Generalized operating mode."]
30842    pub mode: UavcanNodeMode,
30843    #[doc = "Not used currently."]
30844    pub sub_mode: u8,
30845}
30846impl UAVCAN_NODE_STATUS_DATA {
30847    pub const ENCODED_LEN: usize = 17usize;
30848    pub const DEFAULT: Self = Self {
30849        time_usec: 0_u64,
30850        uptime_sec: 0_u32,
30851        vendor_specific_status_code: 0_u16,
30852        health: UavcanNodeHealth::DEFAULT,
30853        mode: UavcanNodeMode::DEFAULT,
30854        sub_mode: 0_u8,
30855    };
30856    #[cfg(feature = "arbitrary")]
30857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30858        use arbitrary::{Arbitrary, Unstructured};
30859        let mut buf = [0u8; 1024];
30860        rng.fill_bytes(&mut buf);
30861        let mut unstructured = Unstructured::new(&buf);
30862        Self::arbitrary(&mut unstructured).unwrap_or_default()
30863    }
30864}
30865impl Default for UAVCAN_NODE_STATUS_DATA {
30866    fn default() -> Self {
30867        Self::DEFAULT.clone()
30868    }
30869}
30870impl MessageData for UAVCAN_NODE_STATUS_DATA {
30871    type Message = MavMessage;
30872    const ID: u32 = 310u32;
30873    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30874    const EXTRA_CRC: u8 = 28u8;
30875    const ENCODED_LEN: usize = 17usize;
30876    fn deser(
30877        _version: MavlinkVersion,
30878        __input: &[u8],
30879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30880        let avail_len = __input.len();
30881        let mut payload_buf = [0; Self::ENCODED_LEN];
30882        let mut buf = if avail_len < Self::ENCODED_LEN {
30883            payload_buf[0..avail_len].copy_from_slice(__input);
30884            Bytes::new(&payload_buf)
30885        } else {
30886            Bytes::new(__input)
30887        };
30888        let mut __struct = Self::default();
30889        __struct.time_usec = buf.get_u64_le()?;
30890        __struct.uptime_sec = buf.get_u32_le()?;
30891        __struct.vendor_specific_status_code = buf.get_u16_le()?;
30892        let tmp = buf.get_u8()?;
30893        __struct.health =
30894            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30895                enum_type: "UavcanNodeHealth",
30896                value: tmp as u64,
30897            })?;
30898        let tmp = buf.get_u8()?;
30899        __struct.mode =
30900            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30901                enum_type: "UavcanNodeMode",
30902                value: tmp as u64,
30903            })?;
30904        __struct.sub_mode = buf.get_u8()?;
30905        Ok(__struct)
30906    }
30907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30908        let mut __tmp = BytesMut::new(bytes);
30909        #[allow(clippy::absurd_extreme_comparisons)]
30910        #[allow(unused_comparisons)]
30911        if __tmp.remaining() < Self::ENCODED_LEN {
30912            panic!(
30913                "buffer is too small (need {} bytes, but got {})",
30914                Self::ENCODED_LEN,
30915                __tmp.remaining(),
30916            )
30917        }
30918        __tmp.put_u64_le(self.time_usec);
30919        __tmp.put_u32_le(self.uptime_sec);
30920        __tmp.put_u16_le(self.vendor_specific_status_code);
30921        __tmp.put_u8(self.health as u8);
30922        __tmp.put_u8(self.mode as u8);
30923        __tmp.put_u8(self.sub_mode);
30924        if matches!(version, MavlinkVersion::V2) {
30925            let len = __tmp.len();
30926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30927        } else {
30928            __tmp.len()
30929        }
30930    }
30931}
30932#[doc = "The global position resulting from GPS and sensor fusion."]
30933#[doc = ""]
30934#[doc = "ID: 340"]
30935#[derive(Debug, Clone, PartialEq)]
30936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30938#[cfg_attr(feature = "ts", derive(TS))]
30939#[cfg_attr(feature = "ts", ts(export))]
30940pub struct UTM_GLOBAL_POSITION_DATA {
30941    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30942    pub time: u64,
30943    #[doc = "Latitude (WGS84)"]
30944    pub lat: i32,
30945    #[doc = "Longitude (WGS84)"]
30946    pub lon: i32,
30947    #[doc = "Altitude (WGS84)"]
30948    pub alt: i32,
30949    #[doc = "Altitude above ground"]
30950    pub relative_alt: i32,
30951    #[doc = "Next waypoint, latitude (WGS84)"]
30952    pub next_lat: i32,
30953    #[doc = "Next waypoint, longitude (WGS84)"]
30954    pub next_lon: i32,
30955    #[doc = "Next waypoint, altitude (WGS84)"]
30956    pub next_alt: i32,
30957    #[doc = "Ground X speed (latitude, positive north)"]
30958    pub vx: i16,
30959    #[doc = "Ground Y speed (longitude, positive east)"]
30960    pub vy: i16,
30961    #[doc = "Ground Z speed (altitude, positive down)"]
30962    pub vz: i16,
30963    #[doc = "Horizontal position uncertainty (standard deviation)"]
30964    pub h_acc: u16,
30965    #[doc = "Altitude uncertainty (standard deviation)"]
30966    pub v_acc: u16,
30967    #[doc = "Speed uncertainty (standard deviation)"]
30968    pub vel_acc: u16,
30969    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30970    pub update_rate: u16,
30971    #[doc = "Unique UAS ID."]
30972    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30973    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30974    pub uas_id: [u8; 18],
30975    #[doc = "Flight state"]
30976    pub flight_state: UtmFlightState,
30977    #[doc = "Bitwise OR combination of the data available flags."]
30978    pub flags: UtmDataAvailFlags,
30979}
30980impl UTM_GLOBAL_POSITION_DATA {
30981    pub const ENCODED_LEN: usize = 70usize;
30982    pub const DEFAULT: Self = Self {
30983        time: 0_u64,
30984        lat: 0_i32,
30985        lon: 0_i32,
30986        alt: 0_i32,
30987        relative_alt: 0_i32,
30988        next_lat: 0_i32,
30989        next_lon: 0_i32,
30990        next_alt: 0_i32,
30991        vx: 0_i16,
30992        vy: 0_i16,
30993        vz: 0_i16,
30994        h_acc: 0_u16,
30995        v_acc: 0_u16,
30996        vel_acc: 0_u16,
30997        update_rate: 0_u16,
30998        uas_id: [0_u8; 18usize],
30999        flight_state: UtmFlightState::DEFAULT,
31000        flags: UtmDataAvailFlags::DEFAULT,
31001    };
31002    #[cfg(feature = "arbitrary")]
31003    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31004        use arbitrary::{Arbitrary, Unstructured};
31005        let mut buf = [0u8; 1024];
31006        rng.fill_bytes(&mut buf);
31007        let mut unstructured = Unstructured::new(&buf);
31008        Self::arbitrary(&mut unstructured).unwrap_or_default()
31009    }
31010}
31011impl Default for UTM_GLOBAL_POSITION_DATA {
31012    fn default() -> Self {
31013        Self::DEFAULT.clone()
31014    }
31015}
31016impl MessageData for UTM_GLOBAL_POSITION_DATA {
31017    type Message = MavMessage;
31018    const ID: u32 = 340u32;
31019    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31020    const EXTRA_CRC: u8 = 99u8;
31021    const ENCODED_LEN: usize = 70usize;
31022    fn deser(
31023        _version: MavlinkVersion,
31024        __input: &[u8],
31025    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31026        let avail_len = __input.len();
31027        let mut payload_buf = [0; Self::ENCODED_LEN];
31028        let mut buf = if avail_len < Self::ENCODED_LEN {
31029            payload_buf[0..avail_len].copy_from_slice(__input);
31030            Bytes::new(&payload_buf)
31031        } else {
31032            Bytes::new(__input)
31033        };
31034        let mut __struct = Self::default();
31035        __struct.time = buf.get_u64_le()?;
31036        __struct.lat = buf.get_i32_le()?;
31037        __struct.lon = buf.get_i32_le()?;
31038        __struct.alt = buf.get_i32_le()?;
31039        __struct.relative_alt = buf.get_i32_le()?;
31040        __struct.next_lat = buf.get_i32_le()?;
31041        __struct.next_lon = buf.get_i32_le()?;
31042        __struct.next_alt = buf.get_i32_le()?;
31043        __struct.vx = buf.get_i16_le()?;
31044        __struct.vy = buf.get_i16_le()?;
31045        __struct.vz = buf.get_i16_le()?;
31046        __struct.h_acc = buf.get_u16_le()?;
31047        __struct.v_acc = buf.get_u16_le()?;
31048        __struct.vel_acc = buf.get_u16_le()?;
31049        __struct.update_rate = buf.get_u16_le()?;
31050        for v in &mut __struct.uas_id {
31051            let val = buf.get_u8()?;
31052            *v = val;
31053        }
31054        let tmp = buf.get_u8()?;
31055        __struct.flight_state =
31056            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31057                enum_type: "UtmFlightState",
31058                value: tmp as u64,
31059            })?;
31060        let tmp = buf.get_u8()?;
31061        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
31062            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31063                flag_type: "UtmDataAvailFlags",
31064                value: tmp as u64,
31065            })?;
31066        Ok(__struct)
31067    }
31068    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31069        let mut __tmp = BytesMut::new(bytes);
31070        #[allow(clippy::absurd_extreme_comparisons)]
31071        #[allow(unused_comparisons)]
31072        if __tmp.remaining() < Self::ENCODED_LEN {
31073            panic!(
31074                "buffer is too small (need {} bytes, but got {})",
31075                Self::ENCODED_LEN,
31076                __tmp.remaining(),
31077            )
31078        }
31079        __tmp.put_u64_le(self.time);
31080        __tmp.put_i32_le(self.lat);
31081        __tmp.put_i32_le(self.lon);
31082        __tmp.put_i32_le(self.alt);
31083        __tmp.put_i32_le(self.relative_alt);
31084        __tmp.put_i32_le(self.next_lat);
31085        __tmp.put_i32_le(self.next_lon);
31086        __tmp.put_i32_le(self.next_alt);
31087        __tmp.put_i16_le(self.vx);
31088        __tmp.put_i16_le(self.vy);
31089        __tmp.put_i16_le(self.vz);
31090        __tmp.put_u16_le(self.h_acc);
31091        __tmp.put_u16_le(self.v_acc);
31092        __tmp.put_u16_le(self.vel_acc);
31093        __tmp.put_u16_le(self.update_rate);
31094        for val in &self.uas_id {
31095            __tmp.put_u8(*val);
31096        }
31097        __tmp.put_u8(self.flight_state as u8);
31098        __tmp.put_u8(self.flags.bits() as u8);
31099        if matches!(version, MavlinkVersion::V2) {
31100            let len = __tmp.len();
31101            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31102        } else {
31103            __tmp.len()
31104        }
31105    }
31106}
31107#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31108#[doc = ""]
31109#[doc = "ID: 248"]
31110#[derive(Debug, Clone, PartialEq)]
31111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31113#[cfg_attr(feature = "ts", derive(TS))]
31114#[cfg_attr(feature = "ts", ts(export))]
31115pub struct V2_EXTENSION_DATA {
31116    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31117    pub message_type: u16,
31118    #[doc = "Network ID (0 for broadcast)"]
31119    pub target_network: u8,
31120    #[doc = "System ID (0 for broadcast)"]
31121    pub target_system: u8,
31122    #[doc = "Component ID (0 for broadcast)"]
31123    pub target_component: u8,
31124    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31127    pub payload: [u8; 249],
31128}
31129impl V2_EXTENSION_DATA {
31130    pub const ENCODED_LEN: usize = 254usize;
31131    pub const DEFAULT: Self = Self {
31132        message_type: 0_u16,
31133        target_network: 0_u8,
31134        target_system: 0_u8,
31135        target_component: 0_u8,
31136        payload: [0_u8; 249usize],
31137    };
31138    #[cfg(feature = "arbitrary")]
31139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31140        use arbitrary::{Arbitrary, Unstructured};
31141        let mut buf = [0u8; 1024];
31142        rng.fill_bytes(&mut buf);
31143        let mut unstructured = Unstructured::new(&buf);
31144        Self::arbitrary(&mut unstructured).unwrap_or_default()
31145    }
31146}
31147impl Default for V2_EXTENSION_DATA {
31148    fn default() -> Self {
31149        Self::DEFAULT.clone()
31150    }
31151}
31152impl MessageData for V2_EXTENSION_DATA {
31153    type Message = MavMessage;
31154    const ID: u32 = 248u32;
31155    const NAME: &'static str = "V2_EXTENSION";
31156    const EXTRA_CRC: u8 = 8u8;
31157    const ENCODED_LEN: usize = 254usize;
31158    fn deser(
31159        _version: MavlinkVersion,
31160        __input: &[u8],
31161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31162        let avail_len = __input.len();
31163        let mut payload_buf = [0; Self::ENCODED_LEN];
31164        let mut buf = if avail_len < Self::ENCODED_LEN {
31165            payload_buf[0..avail_len].copy_from_slice(__input);
31166            Bytes::new(&payload_buf)
31167        } else {
31168            Bytes::new(__input)
31169        };
31170        let mut __struct = Self::default();
31171        __struct.message_type = buf.get_u16_le()?;
31172        __struct.target_network = buf.get_u8()?;
31173        __struct.target_system = buf.get_u8()?;
31174        __struct.target_component = buf.get_u8()?;
31175        for v in &mut __struct.payload {
31176            let val = buf.get_u8()?;
31177            *v = val;
31178        }
31179        Ok(__struct)
31180    }
31181    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31182        let mut __tmp = BytesMut::new(bytes);
31183        #[allow(clippy::absurd_extreme_comparisons)]
31184        #[allow(unused_comparisons)]
31185        if __tmp.remaining() < Self::ENCODED_LEN {
31186            panic!(
31187                "buffer is too small (need {} bytes, but got {})",
31188                Self::ENCODED_LEN,
31189                __tmp.remaining(),
31190            )
31191        }
31192        __tmp.put_u16_le(self.message_type);
31193        __tmp.put_u8(self.target_network);
31194        __tmp.put_u8(self.target_system);
31195        __tmp.put_u8(self.target_component);
31196        for val in &self.payload {
31197            __tmp.put_u8(*val);
31198        }
31199        if matches!(version, MavlinkVersion::V2) {
31200            let len = __tmp.len();
31201            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31202        } else {
31203            __tmp.len()
31204        }
31205    }
31206}
31207#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31208#[doc = ""]
31209#[doc = "ID: 74"]
31210#[derive(Debug, Clone, PartialEq)]
31211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31213#[cfg_attr(feature = "ts", derive(TS))]
31214#[cfg_attr(feature = "ts", ts(export))]
31215pub struct VFR_HUD_DATA {
31216    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31217    pub airspeed: f32,
31218    #[doc = "Current ground speed."]
31219    pub groundspeed: f32,
31220    #[doc = "Current altitude (MSL)."]
31221    pub alt: f32,
31222    #[doc = "Current climb rate."]
31223    pub climb: f32,
31224    #[doc = "Current heading in compass units (0-360, 0=north)."]
31225    pub heading: i16,
31226    #[doc = "Current throttle setting (0 to 100)."]
31227    pub throttle: u16,
31228}
31229impl VFR_HUD_DATA {
31230    pub const ENCODED_LEN: usize = 20usize;
31231    pub const DEFAULT: Self = Self {
31232        airspeed: 0.0_f32,
31233        groundspeed: 0.0_f32,
31234        alt: 0.0_f32,
31235        climb: 0.0_f32,
31236        heading: 0_i16,
31237        throttle: 0_u16,
31238    };
31239    #[cfg(feature = "arbitrary")]
31240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31241        use arbitrary::{Arbitrary, Unstructured};
31242        let mut buf = [0u8; 1024];
31243        rng.fill_bytes(&mut buf);
31244        let mut unstructured = Unstructured::new(&buf);
31245        Self::arbitrary(&mut unstructured).unwrap_or_default()
31246    }
31247}
31248impl Default for VFR_HUD_DATA {
31249    fn default() -> Self {
31250        Self::DEFAULT.clone()
31251    }
31252}
31253impl MessageData for VFR_HUD_DATA {
31254    type Message = MavMessage;
31255    const ID: u32 = 74u32;
31256    const NAME: &'static str = "VFR_HUD";
31257    const EXTRA_CRC: u8 = 20u8;
31258    const ENCODED_LEN: usize = 20usize;
31259    fn deser(
31260        _version: MavlinkVersion,
31261        __input: &[u8],
31262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31263        let avail_len = __input.len();
31264        let mut payload_buf = [0; Self::ENCODED_LEN];
31265        let mut buf = if avail_len < Self::ENCODED_LEN {
31266            payload_buf[0..avail_len].copy_from_slice(__input);
31267            Bytes::new(&payload_buf)
31268        } else {
31269            Bytes::new(__input)
31270        };
31271        let mut __struct = Self::default();
31272        __struct.airspeed = buf.get_f32_le()?;
31273        __struct.groundspeed = buf.get_f32_le()?;
31274        __struct.alt = buf.get_f32_le()?;
31275        __struct.climb = buf.get_f32_le()?;
31276        __struct.heading = buf.get_i16_le()?;
31277        __struct.throttle = buf.get_u16_le()?;
31278        Ok(__struct)
31279    }
31280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31281        let mut __tmp = BytesMut::new(bytes);
31282        #[allow(clippy::absurd_extreme_comparisons)]
31283        #[allow(unused_comparisons)]
31284        if __tmp.remaining() < Self::ENCODED_LEN {
31285            panic!(
31286                "buffer is too small (need {} bytes, but got {})",
31287                Self::ENCODED_LEN,
31288                __tmp.remaining(),
31289            )
31290        }
31291        __tmp.put_f32_le(self.airspeed);
31292        __tmp.put_f32_le(self.groundspeed);
31293        __tmp.put_f32_le(self.alt);
31294        __tmp.put_f32_le(self.climb);
31295        __tmp.put_i16_le(self.heading);
31296        __tmp.put_u16_le(self.throttle);
31297        if matches!(version, MavlinkVersion::V2) {
31298            let len = __tmp.len();
31299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31300        } else {
31301            __tmp.len()
31302        }
31303    }
31304}
31305#[doc = "Vibration levels and accelerometer clipping."]
31306#[doc = ""]
31307#[doc = "ID: 241"]
31308#[derive(Debug, Clone, PartialEq)]
31309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31311#[cfg_attr(feature = "ts", derive(TS))]
31312#[cfg_attr(feature = "ts", ts(export))]
31313pub struct VIBRATION_DATA {
31314    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31315    pub time_usec: u64,
31316    #[doc = "Vibration levels on X-axis"]
31317    pub vibration_x: f32,
31318    #[doc = "Vibration levels on Y-axis"]
31319    pub vibration_y: f32,
31320    #[doc = "Vibration levels on Z-axis"]
31321    pub vibration_z: f32,
31322    #[doc = "first accelerometer clipping count"]
31323    pub clipping_0: u32,
31324    #[doc = "second accelerometer clipping count"]
31325    pub clipping_1: u32,
31326    #[doc = "third accelerometer clipping count"]
31327    pub clipping_2: u32,
31328}
31329impl VIBRATION_DATA {
31330    pub const ENCODED_LEN: usize = 32usize;
31331    pub const DEFAULT: Self = Self {
31332        time_usec: 0_u64,
31333        vibration_x: 0.0_f32,
31334        vibration_y: 0.0_f32,
31335        vibration_z: 0.0_f32,
31336        clipping_0: 0_u32,
31337        clipping_1: 0_u32,
31338        clipping_2: 0_u32,
31339    };
31340    #[cfg(feature = "arbitrary")]
31341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31342        use arbitrary::{Arbitrary, Unstructured};
31343        let mut buf = [0u8; 1024];
31344        rng.fill_bytes(&mut buf);
31345        let mut unstructured = Unstructured::new(&buf);
31346        Self::arbitrary(&mut unstructured).unwrap_or_default()
31347    }
31348}
31349impl Default for VIBRATION_DATA {
31350    fn default() -> Self {
31351        Self::DEFAULT.clone()
31352    }
31353}
31354impl MessageData for VIBRATION_DATA {
31355    type Message = MavMessage;
31356    const ID: u32 = 241u32;
31357    const NAME: &'static str = "VIBRATION";
31358    const EXTRA_CRC: u8 = 90u8;
31359    const ENCODED_LEN: usize = 32usize;
31360    fn deser(
31361        _version: MavlinkVersion,
31362        __input: &[u8],
31363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31364        let avail_len = __input.len();
31365        let mut payload_buf = [0; Self::ENCODED_LEN];
31366        let mut buf = if avail_len < Self::ENCODED_LEN {
31367            payload_buf[0..avail_len].copy_from_slice(__input);
31368            Bytes::new(&payload_buf)
31369        } else {
31370            Bytes::new(__input)
31371        };
31372        let mut __struct = Self::default();
31373        __struct.time_usec = buf.get_u64_le()?;
31374        __struct.vibration_x = buf.get_f32_le()?;
31375        __struct.vibration_y = buf.get_f32_le()?;
31376        __struct.vibration_z = buf.get_f32_le()?;
31377        __struct.clipping_0 = buf.get_u32_le()?;
31378        __struct.clipping_1 = buf.get_u32_le()?;
31379        __struct.clipping_2 = buf.get_u32_le()?;
31380        Ok(__struct)
31381    }
31382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31383        let mut __tmp = BytesMut::new(bytes);
31384        #[allow(clippy::absurd_extreme_comparisons)]
31385        #[allow(unused_comparisons)]
31386        if __tmp.remaining() < Self::ENCODED_LEN {
31387            panic!(
31388                "buffer is too small (need {} bytes, but got {})",
31389                Self::ENCODED_LEN,
31390                __tmp.remaining(),
31391            )
31392        }
31393        __tmp.put_u64_le(self.time_usec);
31394        __tmp.put_f32_le(self.vibration_x);
31395        __tmp.put_f32_le(self.vibration_y);
31396        __tmp.put_f32_le(self.vibration_z);
31397        __tmp.put_u32_le(self.clipping_0);
31398        __tmp.put_u32_le(self.clipping_1);
31399        __tmp.put_u32_le(self.clipping_2);
31400        if matches!(version, MavlinkVersion::V2) {
31401            let len = __tmp.len();
31402            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31403        } else {
31404            __tmp.len()
31405        }
31406    }
31407}
31408#[doc = "Global position estimate from a Vicon motion system source."]
31409#[doc = ""]
31410#[doc = "ID: 104"]
31411#[derive(Debug, Clone, PartialEq)]
31412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31414#[cfg_attr(feature = "ts", derive(TS))]
31415#[cfg_attr(feature = "ts", ts(export))]
31416pub struct VICON_POSITION_ESTIMATE_DATA {
31417    #[doc = "Timestamp (UNIX time or time since system boot)"]
31418    pub usec: u64,
31419    #[doc = "Global X position"]
31420    pub x: f32,
31421    #[doc = "Global Y position"]
31422    pub y: f32,
31423    #[doc = "Global Z position"]
31424    pub z: f32,
31425    #[doc = "Roll angle"]
31426    pub roll: f32,
31427    #[doc = "Pitch angle"]
31428    pub pitch: f32,
31429    #[doc = "Yaw angle"]
31430    pub yaw: f32,
31431    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31432    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31434    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31435    pub covariance: [f32; 21],
31436}
31437impl VICON_POSITION_ESTIMATE_DATA {
31438    pub const ENCODED_LEN: usize = 116usize;
31439    pub const DEFAULT: Self = Self {
31440        usec: 0_u64,
31441        x: 0.0_f32,
31442        y: 0.0_f32,
31443        z: 0.0_f32,
31444        roll: 0.0_f32,
31445        pitch: 0.0_f32,
31446        yaw: 0.0_f32,
31447        covariance: [0.0_f32; 21usize],
31448    };
31449    #[cfg(feature = "arbitrary")]
31450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31451        use arbitrary::{Arbitrary, Unstructured};
31452        let mut buf = [0u8; 1024];
31453        rng.fill_bytes(&mut buf);
31454        let mut unstructured = Unstructured::new(&buf);
31455        Self::arbitrary(&mut unstructured).unwrap_or_default()
31456    }
31457}
31458impl Default for VICON_POSITION_ESTIMATE_DATA {
31459    fn default() -> Self {
31460        Self::DEFAULT.clone()
31461    }
31462}
31463impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31464    type Message = MavMessage;
31465    const ID: u32 = 104u32;
31466    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31467    const EXTRA_CRC: u8 = 56u8;
31468    const ENCODED_LEN: usize = 116usize;
31469    fn deser(
31470        _version: MavlinkVersion,
31471        __input: &[u8],
31472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31473        let avail_len = __input.len();
31474        let mut payload_buf = [0; Self::ENCODED_LEN];
31475        let mut buf = if avail_len < Self::ENCODED_LEN {
31476            payload_buf[0..avail_len].copy_from_slice(__input);
31477            Bytes::new(&payload_buf)
31478        } else {
31479            Bytes::new(__input)
31480        };
31481        let mut __struct = Self::default();
31482        __struct.usec = buf.get_u64_le()?;
31483        __struct.x = buf.get_f32_le()?;
31484        __struct.y = buf.get_f32_le()?;
31485        __struct.z = buf.get_f32_le()?;
31486        __struct.roll = buf.get_f32_le()?;
31487        __struct.pitch = buf.get_f32_le()?;
31488        __struct.yaw = buf.get_f32_le()?;
31489        for v in &mut __struct.covariance {
31490            let val = buf.get_f32_le()?;
31491            *v = val;
31492        }
31493        Ok(__struct)
31494    }
31495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31496        let mut __tmp = BytesMut::new(bytes);
31497        #[allow(clippy::absurd_extreme_comparisons)]
31498        #[allow(unused_comparisons)]
31499        if __tmp.remaining() < Self::ENCODED_LEN {
31500            panic!(
31501                "buffer is too small (need {} bytes, but got {})",
31502                Self::ENCODED_LEN,
31503                __tmp.remaining(),
31504            )
31505        }
31506        __tmp.put_u64_le(self.usec);
31507        __tmp.put_f32_le(self.x);
31508        __tmp.put_f32_le(self.y);
31509        __tmp.put_f32_le(self.z);
31510        __tmp.put_f32_le(self.roll);
31511        __tmp.put_f32_le(self.pitch);
31512        __tmp.put_f32_le(self.yaw);
31513        if matches!(version, MavlinkVersion::V2) {
31514            for val in &self.covariance {
31515                __tmp.put_f32_le(*val);
31516            }
31517            let len = __tmp.len();
31518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31519        } else {
31520            __tmp.len()
31521        }
31522    }
31523}
31524#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31525#[doc = ""]
31526#[doc = "ID: 269"]
31527#[derive(Debug, Clone, PartialEq)]
31528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31530#[cfg_attr(feature = "ts", derive(TS))]
31531#[cfg_attr(feature = "ts", ts(export))]
31532pub struct VIDEO_STREAM_INFORMATION_DATA {
31533    #[doc = "Frame rate."]
31534    pub framerate: f32,
31535    #[doc = "Bit rate."]
31536    pub bitrate: u32,
31537    #[doc = "Bitmap of stream status flags."]
31538    pub flags: VideoStreamStatusFlags,
31539    #[doc = "Horizontal resolution."]
31540    pub resolution_h: u16,
31541    #[doc = "Vertical resolution."]
31542    pub resolution_v: u16,
31543    #[doc = "Video image rotation clockwise."]
31544    pub rotation: u16,
31545    #[doc = "Horizontal Field of view."]
31546    pub hfov: u16,
31547    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31548    pub stream_id: u8,
31549    #[doc = "Number of streams available."]
31550    pub count: u8,
31551    #[doc = "Type of stream."]
31552    pub mavtype: VideoStreamType,
31553    #[doc = "Stream name."]
31554    #[cfg_attr(feature = "ts", ts(type = "string"))]
31555    pub name: CharArray<32>,
31556    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31557    #[cfg_attr(feature = "ts", ts(type = "string"))]
31558    pub uri: CharArray<160>,
31559    #[doc = "Encoding of stream."]
31560    #[cfg_attr(feature = "serde", serde(default))]
31561    pub encoding: VideoStreamEncoding,
31562    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31563    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31564    pub camera_device_id: u8,
31565}
31566impl VIDEO_STREAM_INFORMATION_DATA {
31567    pub const ENCODED_LEN: usize = 215usize;
31568    pub const DEFAULT: Self = Self {
31569        framerate: 0.0_f32,
31570        bitrate: 0_u32,
31571        flags: VideoStreamStatusFlags::DEFAULT,
31572        resolution_h: 0_u16,
31573        resolution_v: 0_u16,
31574        rotation: 0_u16,
31575        hfov: 0_u16,
31576        stream_id: 0_u8,
31577        count: 0_u8,
31578        mavtype: VideoStreamType::DEFAULT,
31579        name: CharArray::new([0_u8; 32usize]),
31580        uri: CharArray::new([0_u8; 160usize]),
31581        encoding: VideoStreamEncoding::DEFAULT,
31582        camera_device_id: 0_u8,
31583    };
31584    #[cfg(feature = "arbitrary")]
31585    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31586        use arbitrary::{Arbitrary, Unstructured};
31587        let mut buf = [0u8; 1024];
31588        rng.fill_bytes(&mut buf);
31589        let mut unstructured = Unstructured::new(&buf);
31590        Self::arbitrary(&mut unstructured).unwrap_or_default()
31591    }
31592}
31593impl Default for VIDEO_STREAM_INFORMATION_DATA {
31594    fn default() -> Self {
31595        Self::DEFAULT.clone()
31596    }
31597}
31598impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31599    type Message = MavMessage;
31600    const ID: u32 = 269u32;
31601    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31602    const EXTRA_CRC: u8 = 109u8;
31603    const ENCODED_LEN: usize = 215usize;
31604    fn deser(
31605        _version: MavlinkVersion,
31606        __input: &[u8],
31607    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31608        let avail_len = __input.len();
31609        let mut payload_buf = [0; Self::ENCODED_LEN];
31610        let mut buf = if avail_len < Self::ENCODED_LEN {
31611            payload_buf[0..avail_len].copy_from_slice(__input);
31612            Bytes::new(&payload_buf)
31613        } else {
31614            Bytes::new(__input)
31615        };
31616        let mut __struct = Self::default();
31617        __struct.framerate = buf.get_f32_le()?;
31618        __struct.bitrate = buf.get_u32_le()?;
31619        let tmp = buf.get_u16_le()?;
31620        __struct.flags =
31621            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31622                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31623                    flag_type: "VideoStreamStatusFlags",
31624                    value: tmp as u64,
31625                })?;
31626        __struct.resolution_h = buf.get_u16_le()?;
31627        __struct.resolution_v = buf.get_u16_le()?;
31628        __struct.rotation = buf.get_u16_le()?;
31629        __struct.hfov = buf.get_u16_le()?;
31630        __struct.stream_id = buf.get_u8()?;
31631        __struct.count = buf.get_u8()?;
31632        let tmp = buf.get_u8()?;
31633        __struct.mavtype =
31634            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31635                enum_type: "VideoStreamType",
31636                value: tmp as u64,
31637            })?;
31638        let mut tmp = [0_u8; 32usize];
31639        for v in &mut tmp {
31640            *v = buf.get_u8()?;
31641        }
31642        __struct.name = CharArray::new(tmp);
31643        let mut tmp = [0_u8; 160usize];
31644        for v in &mut tmp {
31645            *v = buf.get_u8()?;
31646        }
31647        __struct.uri = CharArray::new(tmp);
31648        let tmp = buf.get_u8()?;
31649        __struct.encoding =
31650            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31651                enum_type: "VideoStreamEncoding",
31652                value: tmp as u64,
31653            })?;
31654        __struct.camera_device_id = buf.get_u8()?;
31655        Ok(__struct)
31656    }
31657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31658        let mut __tmp = BytesMut::new(bytes);
31659        #[allow(clippy::absurd_extreme_comparisons)]
31660        #[allow(unused_comparisons)]
31661        if __tmp.remaining() < Self::ENCODED_LEN {
31662            panic!(
31663                "buffer is too small (need {} bytes, but got {})",
31664                Self::ENCODED_LEN,
31665                __tmp.remaining(),
31666            )
31667        }
31668        __tmp.put_f32_le(self.framerate);
31669        __tmp.put_u32_le(self.bitrate);
31670        __tmp.put_u16_le(self.flags.bits() as u16);
31671        __tmp.put_u16_le(self.resolution_h);
31672        __tmp.put_u16_le(self.resolution_v);
31673        __tmp.put_u16_le(self.rotation);
31674        __tmp.put_u16_le(self.hfov);
31675        __tmp.put_u8(self.stream_id);
31676        __tmp.put_u8(self.count);
31677        __tmp.put_u8(self.mavtype as u8);
31678        for val in &self.name {
31679            __tmp.put_u8(*val);
31680        }
31681        for val in &self.uri {
31682            __tmp.put_u8(*val);
31683        }
31684        if matches!(version, MavlinkVersion::V2) {
31685            __tmp.put_u8(self.encoding as u8);
31686            __tmp.put_u8(self.camera_device_id);
31687            let len = __tmp.len();
31688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31689        } else {
31690            __tmp.len()
31691        }
31692    }
31693}
31694#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31695#[doc = ""]
31696#[doc = "ID: 270"]
31697#[derive(Debug, Clone, PartialEq)]
31698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31700#[cfg_attr(feature = "ts", derive(TS))]
31701#[cfg_attr(feature = "ts", ts(export))]
31702pub struct VIDEO_STREAM_STATUS_DATA {
31703    #[doc = "Frame rate"]
31704    pub framerate: f32,
31705    #[doc = "Bit rate"]
31706    pub bitrate: u32,
31707    #[doc = "Bitmap of stream status flags"]
31708    pub flags: VideoStreamStatusFlags,
31709    #[doc = "Horizontal resolution"]
31710    pub resolution_h: u16,
31711    #[doc = "Vertical resolution"]
31712    pub resolution_v: u16,
31713    #[doc = "Video image rotation clockwise"]
31714    pub rotation: u16,
31715    #[doc = "Horizontal Field of view"]
31716    pub hfov: u16,
31717    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31718    pub stream_id: u8,
31719    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31720    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31721    pub camera_device_id: u8,
31722}
31723impl VIDEO_STREAM_STATUS_DATA {
31724    pub const ENCODED_LEN: usize = 20usize;
31725    pub const DEFAULT: Self = Self {
31726        framerate: 0.0_f32,
31727        bitrate: 0_u32,
31728        flags: VideoStreamStatusFlags::DEFAULT,
31729        resolution_h: 0_u16,
31730        resolution_v: 0_u16,
31731        rotation: 0_u16,
31732        hfov: 0_u16,
31733        stream_id: 0_u8,
31734        camera_device_id: 0_u8,
31735    };
31736    #[cfg(feature = "arbitrary")]
31737    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31738        use arbitrary::{Arbitrary, Unstructured};
31739        let mut buf = [0u8; 1024];
31740        rng.fill_bytes(&mut buf);
31741        let mut unstructured = Unstructured::new(&buf);
31742        Self::arbitrary(&mut unstructured).unwrap_or_default()
31743    }
31744}
31745impl Default for VIDEO_STREAM_STATUS_DATA {
31746    fn default() -> Self {
31747        Self::DEFAULT.clone()
31748    }
31749}
31750impl MessageData for VIDEO_STREAM_STATUS_DATA {
31751    type Message = MavMessage;
31752    const ID: u32 = 270u32;
31753    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31754    const EXTRA_CRC: u8 = 59u8;
31755    const ENCODED_LEN: usize = 20usize;
31756    fn deser(
31757        _version: MavlinkVersion,
31758        __input: &[u8],
31759    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31760        let avail_len = __input.len();
31761        let mut payload_buf = [0; Self::ENCODED_LEN];
31762        let mut buf = if avail_len < Self::ENCODED_LEN {
31763            payload_buf[0..avail_len].copy_from_slice(__input);
31764            Bytes::new(&payload_buf)
31765        } else {
31766            Bytes::new(__input)
31767        };
31768        let mut __struct = Self::default();
31769        __struct.framerate = buf.get_f32_le()?;
31770        __struct.bitrate = buf.get_u32_le()?;
31771        let tmp = buf.get_u16_le()?;
31772        __struct.flags =
31773            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31774                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31775                    flag_type: "VideoStreamStatusFlags",
31776                    value: tmp as u64,
31777                })?;
31778        __struct.resolution_h = buf.get_u16_le()?;
31779        __struct.resolution_v = buf.get_u16_le()?;
31780        __struct.rotation = buf.get_u16_le()?;
31781        __struct.hfov = buf.get_u16_le()?;
31782        __struct.stream_id = buf.get_u8()?;
31783        __struct.camera_device_id = buf.get_u8()?;
31784        Ok(__struct)
31785    }
31786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31787        let mut __tmp = BytesMut::new(bytes);
31788        #[allow(clippy::absurd_extreme_comparisons)]
31789        #[allow(unused_comparisons)]
31790        if __tmp.remaining() < Self::ENCODED_LEN {
31791            panic!(
31792                "buffer is too small (need {} bytes, but got {})",
31793                Self::ENCODED_LEN,
31794                __tmp.remaining(),
31795            )
31796        }
31797        __tmp.put_f32_le(self.framerate);
31798        __tmp.put_u32_le(self.bitrate);
31799        __tmp.put_u16_le(self.flags.bits() as u16);
31800        __tmp.put_u16_le(self.resolution_h);
31801        __tmp.put_u16_le(self.resolution_v);
31802        __tmp.put_u16_le(self.rotation);
31803        __tmp.put_u16_le(self.hfov);
31804        __tmp.put_u8(self.stream_id);
31805        if matches!(version, MavlinkVersion::V2) {
31806            __tmp.put_u8(self.camera_device_id);
31807            let len = __tmp.len();
31808            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31809        } else {
31810            __tmp.len()
31811        }
31812    }
31813}
31814#[doc = "Local position/attitude estimate from a vision source."]
31815#[doc = ""]
31816#[doc = "ID: 102"]
31817#[derive(Debug, Clone, PartialEq)]
31818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31820#[cfg_attr(feature = "ts", derive(TS))]
31821#[cfg_attr(feature = "ts", ts(export))]
31822pub struct VISION_POSITION_ESTIMATE_DATA {
31823    #[doc = "Timestamp (UNIX time or time since system boot)"]
31824    pub usec: u64,
31825    #[doc = "Local X position"]
31826    pub x: f32,
31827    #[doc = "Local Y position"]
31828    pub y: f32,
31829    #[doc = "Local Z position"]
31830    pub z: f32,
31831    #[doc = "Roll angle"]
31832    pub roll: f32,
31833    #[doc = "Pitch angle"]
31834    pub pitch: f32,
31835    #[doc = "Yaw angle"]
31836    pub yaw: f32,
31837    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31838    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31840    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31841    pub covariance: [f32; 21],
31842    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31843    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31844    pub reset_counter: u8,
31845}
31846impl VISION_POSITION_ESTIMATE_DATA {
31847    pub const ENCODED_LEN: usize = 117usize;
31848    pub const DEFAULT: Self = Self {
31849        usec: 0_u64,
31850        x: 0.0_f32,
31851        y: 0.0_f32,
31852        z: 0.0_f32,
31853        roll: 0.0_f32,
31854        pitch: 0.0_f32,
31855        yaw: 0.0_f32,
31856        covariance: [0.0_f32; 21usize],
31857        reset_counter: 0_u8,
31858    };
31859    #[cfg(feature = "arbitrary")]
31860    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31861        use arbitrary::{Arbitrary, Unstructured};
31862        let mut buf = [0u8; 1024];
31863        rng.fill_bytes(&mut buf);
31864        let mut unstructured = Unstructured::new(&buf);
31865        Self::arbitrary(&mut unstructured).unwrap_or_default()
31866    }
31867}
31868impl Default for VISION_POSITION_ESTIMATE_DATA {
31869    fn default() -> Self {
31870        Self::DEFAULT.clone()
31871    }
31872}
31873impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31874    type Message = MavMessage;
31875    const ID: u32 = 102u32;
31876    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31877    const EXTRA_CRC: u8 = 158u8;
31878    const ENCODED_LEN: usize = 117usize;
31879    fn deser(
31880        _version: MavlinkVersion,
31881        __input: &[u8],
31882    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31883        let avail_len = __input.len();
31884        let mut payload_buf = [0; Self::ENCODED_LEN];
31885        let mut buf = if avail_len < Self::ENCODED_LEN {
31886            payload_buf[0..avail_len].copy_from_slice(__input);
31887            Bytes::new(&payload_buf)
31888        } else {
31889            Bytes::new(__input)
31890        };
31891        let mut __struct = Self::default();
31892        __struct.usec = buf.get_u64_le()?;
31893        __struct.x = buf.get_f32_le()?;
31894        __struct.y = buf.get_f32_le()?;
31895        __struct.z = buf.get_f32_le()?;
31896        __struct.roll = buf.get_f32_le()?;
31897        __struct.pitch = buf.get_f32_le()?;
31898        __struct.yaw = buf.get_f32_le()?;
31899        for v in &mut __struct.covariance {
31900            let val = buf.get_f32_le()?;
31901            *v = val;
31902        }
31903        __struct.reset_counter = buf.get_u8()?;
31904        Ok(__struct)
31905    }
31906    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31907        let mut __tmp = BytesMut::new(bytes);
31908        #[allow(clippy::absurd_extreme_comparisons)]
31909        #[allow(unused_comparisons)]
31910        if __tmp.remaining() < Self::ENCODED_LEN {
31911            panic!(
31912                "buffer is too small (need {} bytes, but got {})",
31913                Self::ENCODED_LEN,
31914                __tmp.remaining(),
31915            )
31916        }
31917        __tmp.put_u64_le(self.usec);
31918        __tmp.put_f32_le(self.x);
31919        __tmp.put_f32_le(self.y);
31920        __tmp.put_f32_le(self.z);
31921        __tmp.put_f32_le(self.roll);
31922        __tmp.put_f32_le(self.pitch);
31923        __tmp.put_f32_le(self.yaw);
31924        if matches!(version, MavlinkVersion::V2) {
31925            for val in &self.covariance {
31926                __tmp.put_f32_le(*val);
31927            }
31928            __tmp.put_u8(self.reset_counter);
31929            let len = __tmp.len();
31930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31931        } else {
31932            __tmp.len()
31933        }
31934    }
31935}
31936#[doc = "Speed estimate from a vision source."]
31937#[doc = ""]
31938#[doc = "ID: 103"]
31939#[derive(Debug, Clone, PartialEq)]
31940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31941#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31942#[cfg_attr(feature = "ts", derive(TS))]
31943#[cfg_attr(feature = "ts", ts(export))]
31944pub struct VISION_SPEED_ESTIMATE_DATA {
31945    #[doc = "Timestamp (UNIX time or time since system boot)"]
31946    pub usec: u64,
31947    #[doc = "Global X speed"]
31948    pub x: f32,
31949    #[doc = "Global Y speed"]
31950    pub y: f32,
31951    #[doc = "Global Z speed"]
31952    pub z: f32,
31953    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31954    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31956    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31957    pub covariance: [f32; 9],
31958    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31959    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31960    pub reset_counter: u8,
31961}
31962impl VISION_SPEED_ESTIMATE_DATA {
31963    pub const ENCODED_LEN: usize = 57usize;
31964    pub const DEFAULT: Self = Self {
31965        usec: 0_u64,
31966        x: 0.0_f32,
31967        y: 0.0_f32,
31968        z: 0.0_f32,
31969        covariance: [0.0_f32; 9usize],
31970        reset_counter: 0_u8,
31971    };
31972    #[cfg(feature = "arbitrary")]
31973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31974        use arbitrary::{Arbitrary, Unstructured};
31975        let mut buf = [0u8; 1024];
31976        rng.fill_bytes(&mut buf);
31977        let mut unstructured = Unstructured::new(&buf);
31978        Self::arbitrary(&mut unstructured).unwrap_or_default()
31979    }
31980}
31981impl Default for VISION_SPEED_ESTIMATE_DATA {
31982    fn default() -> Self {
31983        Self::DEFAULT.clone()
31984    }
31985}
31986impl MessageData for VISION_SPEED_ESTIMATE_DATA {
31987    type Message = MavMessage;
31988    const ID: u32 = 103u32;
31989    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
31990    const EXTRA_CRC: u8 = 208u8;
31991    const ENCODED_LEN: usize = 57usize;
31992    fn deser(
31993        _version: MavlinkVersion,
31994        __input: &[u8],
31995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31996        let avail_len = __input.len();
31997        let mut payload_buf = [0; Self::ENCODED_LEN];
31998        let mut buf = if avail_len < Self::ENCODED_LEN {
31999            payload_buf[0..avail_len].copy_from_slice(__input);
32000            Bytes::new(&payload_buf)
32001        } else {
32002            Bytes::new(__input)
32003        };
32004        let mut __struct = Self::default();
32005        __struct.usec = buf.get_u64_le()?;
32006        __struct.x = buf.get_f32_le()?;
32007        __struct.y = buf.get_f32_le()?;
32008        __struct.z = buf.get_f32_le()?;
32009        for v in &mut __struct.covariance {
32010            let val = buf.get_f32_le()?;
32011            *v = val;
32012        }
32013        __struct.reset_counter = buf.get_u8()?;
32014        Ok(__struct)
32015    }
32016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32017        let mut __tmp = BytesMut::new(bytes);
32018        #[allow(clippy::absurd_extreme_comparisons)]
32019        #[allow(unused_comparisons)]
32020        if __tmp.remaining() < Self::ENCODED_LEN {
32021            panic!(
32022                "buffer is too small (need {} bytes, but got {})",
32023                Self::ENCODED_LEN,
32024                __tmp.remaining(),
32025            )
32026        }
32027        __tmp.put_u64_le(self.usec);
32028        __tmp.put_f32_le(self.x);
32029        __tmp.put_f32_le(self.y);
32030        __tmp.put_f32_le(self.z);
32031        if matches!(version, MavlinkVersion::V2) {
32032            for val in &self.covariance {
32033                __tmp.put_f32_le(*val);
32034            }
32035            __tmp.put_u8(self.reset_counter);
32036            let len = __tmp.len();
32037            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32038        } else {
32039            __tmp.len()
32040        }
32041    }
32042}
32043#[doc = "Cumulative distance traveled for each reported wheel."]
32044#[doc = ""]
32045#[doc = "ID: 9000"]
32046#[derive(Debug, Clone, PartialEq)]
32047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32049#[cfg_attr(feature = "ts", derive(TS))]
32050#[cfg_attr(feature = "ts", ts(export))]
32051pub struct WHEEL_DISTANCE_DATA {
32052    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32053    pub time_usec: u64,
32054    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32055    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32056    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32057    pub distance: [f64; 16],
32058    #[doc = "Number of wheels reported."]
32059    pub count: u8,
32060}
32061impl WHEEL_DISTANCE_DATA {
32062    pub const ENCODED_LEN: usize = 137usize;
32063    pub const DEFAULT: Self = Self {
32064        time_usec: 0_u64,
32065        distance: [0.0_f64; 16usize],
32066        count: 0_u8,
32067    };
32068    #[cfg(feature = "arbitrary")]
32069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32070        use arbitrary::{Arbitrary, Unstructured};
32071        let mut buf = [0u8; 1024];
32072        rng.fill_bytes(&mut buf);
32073        let mut unstructured = Unstructured::new(&buf);
32074        Self::arbitrary(&mut unstructured).unwrap_or_default()
32075    }
32076}
32077impl Default for WHEEL_DISTANCE_DATA {
32078    fn default() -> Self {
32079        Self::DEFAULT.clone()
32080    }
32081}
32082impl MessageData for WHEEL_DISTANCE_DATA {
32083    type Message = MavMessage;
32084    const ID: u32 = 9000u32;
32085    const NAME: &'static str = "WHEEL_DISTANCE";
32086    const EXTRA_CRC: u8 = 113u8;
32087    const ENCODED_LEN: usize = 137usize;
32088    fn deser(
32089        _version: MavlinkVersion,
32090        __input: &[u8],
32091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32092        let avail_len = __input.len();
32093        let mut payload_buf = [0; Self::ENCODED_LEN];
32094        let mut buf = if avail_len < Self::ENCODED_LEN {
32095            payload_buf[0..avail_len].copy_from_slice(__input);
32096            Bytes::new(&payload_buf)
32097        } else {
32098            Bytes::new(__input)
32099        };
32100        let mut __struct = Self::default();
32101        __struct.time_usec = buf.get_u64_le()?;
32102        for v in &mut __struct.distance {
32103            let val = buf.get_f64_le()?;
32104            *v = val;
32105        }
32106        __struct.count = buf.get_u8()?;
32107        Ok(__struct)
32108    }
32109    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32110        let mut __tmp = BytesMut::new(bytes);
32111        #[allow(clippy::absurd_extreme_comparisons)]
32112        #[allow(unused_comparisons)]
32113        if __tmp.remaining() < Self::ENCODED_LEN {
32114            panic!(
32115                "buffer is too small (need {} bytes, but got {})",
32116                Self::ENCODED_LEN,
32117                __tmp.remaining(),
32118            )
32119        }
32120        __tmp.put_u64_le(self.time_usec);
32121        for val in &self.distance {
32122            __tmp.put_f64_le(*val);
32123        }
32124        __tmp.put_u8(self.count);
32125        if matches!(version, MavlinkVersion::V2) {
32126            let len = __tmp.len();
32127            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32128        } else {
32129            __tmp.len()
32130        }
32131    }
32132}
32133#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32134#[doc = ""]
32135#[doc = "ID: 299"]
32136#[derive(Debug, Clone, PartialEq)]
32137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32139#[cfg_attr(feature = "ts", derive(TS))]
32140#[cfg_attr(feature = "ts", ts(export))]
32141pub struct WIFI_CONFIG_AP_DATA {
32142    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32143    #[cfg_attr(feature = "ts", ts(type = "string"))]
32144    pub ssid: CharArray<32>,
32145    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32146    #[cfg_attr(feature = "ts", ts(type = "string"))]
32147    pub password: CharArray<64>,
32148    #[doc = "WiFi Mode."]
32149    #[cfg_attr(feature = "serde", serde(default))]
32150    pub mode: WifiConfigApMode,
32151    #[doc = "Message acceptance response (sent back to GS)."]
32152    #[cfg_attr(feature = "serde", serde(default))]
32153    pub response: WifiConfigApResponse,
32154}
32155impl WIFI_CONFIG_AP_DATA {
32156    pub const ENCODED_LEN: usize = 98usize;
32157    pub const DEFAULT: Self = Self {
32158        ssid: CharArray::new([0_u8; 32usize]),
32159        password: CharArray::new([0_u8; 64usize]),
32160        mode: WifiConfigApMode::DEFAULT,
32161        response: WifiConfigApResponse::DEFAULT,
32162    };
32163    #[cfg(feature = "arbitrary")]
32164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32165        use arbitrary::{Arbitrary, Unstructured};
32166        let mut buf = [0u8; 1024];
32167        rng.fill_bytes(&mut buf);
32168        let mut unstructured = Unstructured::new(&buf);
32169        Self::arbitrary(&mut unstructured).unwrap_or_default()
32170    }
32171}
32172impl Default for WIFI_CONFIG_AP_DATA {
32173    fn default() -> Self {
32174        Self::DEFAULT.clone()
32175    }
32176}
32177impl MessageData for WIFI_CONFIG_AP_DATA {
32178    type Message = MavMessage;
32179    const ID: u32 = 299u32;
32180    const NAME: &'static str = "WIFI_CONFIG_AP";
32181    const EXTRA_CRC: u8 = 19u8;
32182    const ENCODED_LEN: usize = 98usize;
32183    fn deser(
32184        _version: MavlinkVersion,
32185        __input: &[u8],
32186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32187        let avail_len = __input.len();
32188        let mut payload_buf = [0; Self::ENCODED_LEN];
32189        let mut buf = if avail_len < Self::ENCODED_LEN {
32190            payload_buf[0..avail_len].copy_from_slice(__input);
32191            Bytes::new(&payload_buf)
32192        } else {
32193            Bytes::new(__input)
32194        };
32195        let mut __struct = Self::default();
32196        let mut tmp = [0_u8; 32usize];
32197        for v in &mut tmp {
32198            *v = buf.get_u8()?;
32199        }
32200        __struct.ssid = CharArray::new(tmp);
32201        let mut tmp = [0_u8; 64usize];
32202        for v in &mut tmp {
32203            *v = buf.get_u8()?;
32204        }
32205        __struct.password = CharArray::new(tmp);
32206        let tmp = buf.get_i8()?;
32207        __struct.mode =
32208            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32209                enum_type: "WifiConfigApMode",
32210                value: tmp as u64,
32211            })?;
32212        let tmp = buf.get_i8()?;
32213        __struct.response =
32214            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32215                enum_type: "WifiConfigApResponse",
32216                value: tmp as u64,
32217            })?;
32218        Ok(__struct)
32219    }
32220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32221        let mut __tmp = BytesMut::new(bytes);
32222        #[allow(clippy::absurd_extreme_comparisons)]
32223        #[allow(unused_comparisons)]
32224        if __tmp.remaining() < Self::ENCODED_LEN {
32225            panic!(
32226                "buffer is too small (need {} bytes, but got {})",
32227                Self::ENCODED_LEN,
32228                __tmp.remaining(),
32229            )
32230        }
32231        for val in &self.ssid {
32232            __tmp.put_u8(*val);
32233        }
32234        for val in &self.password {
32235            __tmp.put_u8(*val);
32236        }
32237        if matches!(version, MavlinkVersion::V2) {
32238            __tmp.put_i8(self.mode as i8);
32239            __tmp.put_i8(self.response as i8);
32240            let len = __tmp.len();
32241            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32242        } else {
32243            __tmp.len()
32244        }
32245    }
32246}
32247#[doc = "Winch status."]
32248#[doc = ""]
32249#[doc = "ID: 9005"]
32250#[derive(Debug, Clone, PartialEq)]
32251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32252#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32253#[cfg_attr(feature = "ts", derive(TS))]
32254#[cfg_attr(feature = "ts", ts(export))]
32255pub struct WINCH_STATUS_DATA {
32256    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32257    pub time_usec: u64,
32258    #[doc = "Length of line released. NaN if unknown"]
32259    pub line_length: f32,
32260    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32261    pub speed: f32,
32262    #[doc = "Tension on the line. NaN if unknown"]
32263    pub tension: f32,
32264    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32265    pub voltage: f32,
32266    #[doc = "Current draw from the winch. NaN if unknown"]
32267    pub current: f32,
32268    #[doc = "Status flags"]
32269    pub status: MavWinchStatusFlag,
32270    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32271    pub temperature: i16,
32272}
32273impl WINCH_STATUS_DATA {
32274    pub const ENCODED_LEN: usize = 34usize;
32275    pub const DEFAULT: Self = Self {
32276        time_usec: 0_u64,
32277        line_length: 0.0_f32,
32278        speed: 0.0_f32,
32279        tension: 0.0_f32,
32280        voltage: 0.0_f32,
32281        current: 0.0_f32,
32282        status: MavWinchStatusFlag::DEFAULT,
32283        temperature: 0_i16,
32284    };
32285    #[cfg(feature = "arbitrary")]
32286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32287        use arbitrary::{Arbitrary, Unstructured};
32288        let mut buf = [0u8; 1024];
32289        rng.fill_bytes(&mut buf);
32290        let mut unstructured = Unstructured::new(&buf);
32291        Self::arbitrary(&mut unstructured).unwrap_or_default()
32292    }
32293}
32294impl Default for WINCH_STATUS_DATA {
32295    fn default() -> Self {
32296        Self::DEFAULT.clone()
32297    }
32298}
32299impl MessageData for WINCH_STATUS_DATA {
32300    type Message = MavMessage;
32301    const ID: u32 = 9005u32;
32302    const NAME: &'static str = "WINCH_STATUS";
32303    const EXTRA_CRC: u8 = 117u8;
32304    const ENCODED_LEN: usize = 34usize;
32305    fn deser(
32306        _version: MavlinkVersion,
32307        __input: &[u8],
32308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32309        let avail_len = __input.len();
32310        let mut payload_buf = [0; Self::ENCODED_LEN];
32311        let mut buf = if avail_len < Self::ENCODED_LEN {
32312            payload_buf[0..avail_len].copy_from_slice(__input);
32313            Bytes::new(&payload_buf)
32314        } else {
32315            Bytes::new(__input)
32316        };
32317        let mut __struct = Self::default();
32318        __struct.time_usec = buf.get_u64_le()?;
32319        __struct.line_length = buf.get_f32_le()?;
32320        __struct.speed = buf.get_f32_le()?;
32321        __struct.tension = buf.get_f32_le()?;
32322        __struct.voltage = buf.get_f32_le()?;
32323        __struct.current = buf.get_f32_le()?;
32324        let tmp = buf.get_u32_le()?;
32325        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
32326            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32327                flag_type: "MavWinchStatusFlag",
32328                value: tmp as u64,
32329            })?;
32330        __struct.temperature = buf.get_i16_le()?;
32331        Ok(__struct)
32332    }
32333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32334        let mut __tmp = BytesMut::new(bytes);
32335        #[allow(clippy::absurd_extreme_comparisons)]
32336        #[allow(unused_comparisons)]
32337        if __tmp.remaining() < Self::ENCODED_LEN {
32338            panic!(
32339                "buffer is too small (need {} bytes, but got {})",
32340                Self::ENCODED_LEN,
32341                __tmp.remaining(),
32342            )
32343        }
32344        __tmp.put_u64_le(self.time_usec);
32345        __tmp.put_f32_le(self.line_length);
32346        __tmp.put_f32_le(self.speed);
32347        __tmp.put_f32_le(self.tension);
32348        __tmp.put_f32_le(self.voltage);
32349        __tmp.put_f32_le(self.current);
32350        __tmp.put_u32_le(self.status.bits() as u32);
32351        __tmp.put_i16_le(self.temperature);
32352        if matches!(version, MavlinkVersion::V2) {
32353            let len = __tmp.len();
32354            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32355        } else {
32356            __tmp.len()
32357        }
32358    }
32359}
32360#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32361#[doc = ""]
32362#[doc = "ID: 231"]
32363#[derive(Debug, Clone, PartialEq)]
32364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32366#[cfg_attr(feature = "ts", derive(TS))]
32367#[cfg_attr(feature = "ts", ts(export))]
32368pub struct WIND_COV_DATA {
32369    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32370    pub time_usec: u64,
32371    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32372    pub wind_x: f32,
32373    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32374    pub wind_y: f32,
32375    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32376    pub wind_z: f32,
32377    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32378    pub var_horiz: f32,
32379    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32380    pub var_vert: f32,
32381    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32382    pub wind_alt: f32,
32383    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32384    pub horiz_accuracy: f32,
32385    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32386    pub vert_accuracy: f32,
32387}
32388impl WIND_COV_DATA {
32389    pub const ENCODED_LEN: usize = 40usize;
32390    pub const DEFAULT: Self = Self {
32391        time_usec: 0_u64,
32392        wind_x: 0.0_f32,
32393        wind_y: 0.0_f32,
32394        wind_z: 0.0_f32,
32395        var_horiz: 0.0_f32,
32396        var_vert: 0.0_f32,
32397        wind_alt: 0.0_f32,
32398        horiz_accuracy: 0.0_f32,
32399        vert_accuracy: 0.0_f32,
32400    };
32401    #[cfg(feature = "arbitrary")]
32402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32403        use arbitrary::{Arbitrary, Unstructured};
32404        let mut buf = [0u8; 1024];
32405        rng.fill_bytes(&mut buf);
32406        let mut unstructured = Unstructured::new(&buf);
32407        Self::arbitrary(&mut unstructured).unwrap_or_default()
32408    }
32409}
32410impl Default for WIND_COV_DATA {
32411    fn default() -> Self {
32412        Self::DEFAULT.clone()
32413    }
32414}
32415impl MessageData for WIND_COV_DATA {
32416    type Message = MavMessage;
32417    const ID: u32 = 231u32;
32418    const NAME: &'static str = "WIND_COV";
32419    const EXTRA_CRC: u8 = 105u8;
32420    const ENCODED_LEN: usize = 40usize;
32421    fn deser(
32422        _version: MavlinkVersion,
32423        __input: &[u8],
32424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32425        let avail_len = __input.len();
32426        let mut payload_buf = [0; Self::ENCODED_LEN];
32427        let mut buf = if avail_len < Self::ENCODED_LEN {
32428            payload_buf[0..avail_len].copy_from_slice(__input);
32429            Bytes::new(&payload_buf)
32430        } else {
32431            Bytes::new(__input)
32432        };
32433        let mut __struct = Self::default();
32434        __struct.time_usec = buf.get_u64_le()?;
32435        __struct.wind_x = buf.get_f32_le()?;
32436        __struct.wind_y = buf.get_f32_le()?;
32437        __struct.wind_z = buf.get_f32_le()?;
32438        __struct.var_horiz = buf.get_f32_le()?;
32439        __struct.var_vert = buf.get_f32_le()?;
32440        __struct.wind_alt = buf.get_f32_le()?;
32441        __struct.horiz_accuracy = buf.get_f32_le()?;
32442        __struct.vert_accuracy = buf.get_f32_le()?;
32443        Ok(__struct)
32444    }
32445    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32446        let mut __tmp = BytesMut::new(bytes);
32447        #[allow(clippy::absurd_extreme_comparisons)]
32448        #[allow(unused_comparisons)]
32449        if __tmp.remaining() < Self::ENCODED_LEN {
32450            panic!(
32451                "buffer is too small (need {} bytes, but got {})",
32452                Self::ENCODED_LEN,
32453                __tmp.remaining(),
32454            )
32455        }
32456        __tmp.put_u64_le(self.time_usec);
32457        __tmp.put_f32_le(self.wind_x);
32458        __tmp.put_f32_le(self.wind_y);
32459        __tmp.put_f32_le(self.wind_z);
32460        __tmp.put_f32_le(self.var_horiz);
32461        __tmp.put_f32_le(self.var_vert);
32462        __tmp.put_f32_le(self.wind_alt);
32463        __tmp.put_f32_le(self.horiz_accuracy);
32464        __tmp.put_f32_le(self.vert_accuracy);
32465        if matches!(version, MavlinkVersion::V2) {
32466            let len = __tmp.len();
32467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32468        } else {
32469            __tmp.len()
32470        }
32471    }
32472}
32473#[derive(Clone, PartialEq, Debug)]
32474#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32475#[cfg_attr(feature = "serde", serde(tag = "type"))]
32476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32477#[cfg_attr(feature = "ts", derive(TS))]
32478#[cfg_attr(feature = "ts", ts(export))]
32479#[repr(u32)]
32480pub enum MavMessage {
32481    #[doc = "Set the vehicle attitude and body angular rates."]
32482    #[doc = ""]
32483    #[doc = "ID: 140"]
32484    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32485    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32486    #[doc = ""]
32487    #[doc = "ID: 375"]
32488    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32489    #[doc = "The location and information of an ADSB vehicle."]
32490    #[doc = ""]
32491    #[doc = "ID: 246"]
32492    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32493    #[doc = "The location and information of an AIS vessel."]
32494    #[doc = ""]
32495    #[doc = "ID: 301"]
32496    AIS_VESSEL(AIS_VESSEL_DATA),
32497    #[doc = "The current system altitude."]
32498    #[doc = ""]
32499    #[doc = "ID: 141"]
32500    ALTITUDE(ALTITUDE_DATA),
32501    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32502    #[doc = ""]
32503    #[doc = "ID: 30"]
32504    ATTITUDE(ATTITUDE_DATA),
32505    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32506    #[doc = ""]
32507    #[doc = "ID: 31"]
32508    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32509    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32510    #[doc = ""]
32511    #[doc = "ID: 61"]
32512    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32513    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32514    #[doc = ""]
32515    #[doc = "ID: 83"]
32516    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32517    #[doc = "Motion capture attitude and position."]
32518    #[doc = ""]
32519    #[doc = "ID: 138"]
32520    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32521    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32522    #[doc = ""]
32523    #[doc = "ID: 7"]
32524    AUTH_KEY(AUTH_KEY_DATA),
32525    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32526    #[doc = ""]
32527    #[doc = "ID: 286"]
32528    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32529    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32530    #[doc = ""]
32531    #[doc = "ID: 148"]
32532    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32533    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32534    #[doc = ""]
32535    #[doc = "ID: 435"]
32536    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32537    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32538    #[doc = ""]
32539    #[doc = "ID: 437"]
32540    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32541    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32542    #[doc = ""]
32543    #[doc = "ID: 372"]
32544    BATTERY_INFO(BATTERY_INFO_DATA),
32545    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32546    #[doc = ""]
32547    #[doc = "ID: 147"]
32548    BATTERY_STATUS(BATTERY_STATUS_DATA),
32549    #[doc = "Report button state change."]
32550    #[doc = ""]
32551    #[doc = "ID: 257"]
32552    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32553    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32554    #[doc = ""]
32555    #[doc = "ID: 262"]
32556    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32557    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32558    #[doc = ""]
32559    #[doc = "ID: 271"]
32560    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32561    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32562    #[doc = ""]
32563    #[doc = "ID: 263"]
32564    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32565    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32566    #[doc = ""]
32567    #[doc = "ID: 259"]
32568    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32569    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32570    #[doc = ""]
32571    #[doc = "ID: 260"]
32572    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32573    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32574    #[doc = ""]
32575    #[doc = "ID: 277"]
32576    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32577    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32578    #[doc = ""]
32579    #[doc = "ID: 276"]
32580    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32581    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32582    #[doc = ""]
32583    #[doc = "ID: 275"]
32584    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32585    #[doc = "Camera-IMU triggering and synchronisation message."]
32586    #[doc = ""]
32587    #[doc = "ID: 112"]
32588    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32589    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32590    #[doc = ""]
32591    #[doc = "ID: 387"]
32592    CANFD_FRAME(CANFD_FRAME_DATA),
32593    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32594    #[doc = ""]
32595    #[doc = "ID: 388"]
32596    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32597    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32598    #[doc = ""]
32599    #[doc = "ID: 386"]
32600    CAN_FRAME(CAN_FRAME_DATA),
32601    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32602    #[doc = ""]
32603    #[doc = "ID: 336"]
32604    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32605    #[doc = "Report current used cellular network status."]
32606    #[doc = ""]
32607    #[doc = "ID: 334"]
32608    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32609    #[doc = "Request to control this MAV."]
32610    #[doc = ""]
32611    #[doc = "ID: 5"]
32612    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32613    #[doc = "Accept / deny control of this MAV."]
32614    #[doc = ""]
32615    #[doc = "ID: 6"]
32616    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32617    #[doc = "Information about a potential collision."]
32618    #[doc = ""]
32619    #[doc = "ID: 247"]
32620    COLLISION(COLLISION_DATA),
32621    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32622    #[doc = ""]
32623    #[doc = "ID: 77"]
32624    COMMAND_ACK(COMMAND_ACK_DATA),
32625    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32626    #[doc = ""]
32627    #[doc = "ID: 80"]
32628    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32629    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32630    #[doc = ""]
32631    #[doc = "ID: 75"]
32632    COMMAND_INT(COMMAND_INT_DATA),
32633    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32634    #[doc = ""]
32635    #[doc = "ID: 76"]
32636    COMMAND_LONG(COMMAND_LONG_DATA),
32637    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32638    #[doc = ""]
32639    #[doc = "ID: 395"]
32640    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32641    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32642    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32643    #[doc = ""]
32644    #[doc = "ID: 396"]
32645    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32646    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32647    #[doc = ""]
32648    #[doc = "ID: 397"]
32649    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32650    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32651    #[doc = ""]
32652    #[doc = "ID: 146"]
32653    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32654    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32655    #[doc = ""]
32656    #[doc = "ID: 411"]
32657    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32658    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32659    #[doc = ""]
32660    #[doc = "ID: 436"]
32661    CURRENT_MODE(CURRENT_MODE_DATA),
32662    #[doc = "Data stream status information."]
32663    #[doc = ""]
32664    #[doc = "ID: 67"]
32665    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32666    DATA_STREAM(DATA_STREAM_DATA),
32667    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32668    #[doc = ""]
32669    #[doc = "ID: 130"]
32670    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32671    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32672    #[doc = ""]
32673    #[doc = "ID: 254"]
32674    DEBUG(DEBUG_DATA),
32675    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32676    #[doc = ""]
32677    #[doc = "ID: 350"]
32678    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32679    #[doc = "To debug something using a named 3D vector."]
32680    #[doc = ""]
32681    #[doc = "ID: 250"]
32682    DEBUG_VECT(DEBUG_VECT_DATA),
32683    #[doc = "Distance sensor information for an onboard rangefinder."]
32684    #[doc = ""]
32685    #[doc = "ID: 132"]
32686    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32687    #[doc = "EFI status output."]
32688    #[doc = ""]
32689    #[doc = "ID: 225"]
32690    EFI_STATUS(EFI_STATUS_DATA),
32691    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32692    #[doc = ""]
32693    #[doc = "ID: 131"]
32694    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32695    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32696    #[doc = ""]
32697    #[doc = "ID: 290"]
32698    ESC_INFO(ESC_INFO_DATA),
32699    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32700    #[doc = ""]
32701    #[doc = "ID: 291"]
32702    ESC_STATUS(ESC_STATUS_DATA),
32703    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32704    #[doc = ""]
32705    #[doc = "ID: 230"]
32706    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32707    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32708    #[doc = ""]
32709    #[doc = "ID: 410"]
32710    EVENT(EVENT_DATA),
32711    #[doc = "Provides state for additional features."]
32712    #[doc = ""]
32713    #[doc = "ID: 245"]
32714    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32715    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32716    #[doc = ""]
32717    #[doc = "ID: 162"]
32718    FENCE_STATUS(FENCE_STATUS_DATA),
32719    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32720    #[doc = ""]
32721    #[doc = "ID: 110"]
32722    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32723    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32724    #[doc = ""]
32725    #[doc = "ID: 264"]
32726    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32727    #[doc = "Current motion information from a designated system."]
32728    #[doc = ""]
32729    #[doc = "ID: 144"]
32730    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32731    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32732    #[doc = ""]
32733    #[doc = "ID: 371"]
32734    FUEL_STATUS(FUEL_STATUS_DATA),
32735    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32736    #[doc = ""]
32737    #[doc = "ID: 373"]
32738    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32739    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32740    #[doc = ""]
32741    #[doc = "ID: 285"]
32742    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32743    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32744    #[doc = ""]
32745    #[doc = "ID: 283"]
32746    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32747    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32748    #[doc = ""]
32749    #[doc = "ID: 284"]
32750    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32751    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32752    #[doc = ""]
32753    #[doc = "ID: 280"]
32754    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32755    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32756    #[doc = ""]
32757    #[doc = "ID: 282"]
32758    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32759    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32760    #[doc = ""]
32761    #[doc = "ID: 288"]
32762    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32763    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32764    #[doc = ""]
32765    #[doc = "ID: 287"]
32766    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32767    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32768    #[doc = ""]
32769    #[doc = "ID: 281"]
32770    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32771    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32772    #[doc = ""]
32773    #[doc = "ID: 33"]
32774    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32775    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32776    #[doc = ""]
32777    #[doc = "ID: 63"]
32778    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32779    #[doc = "Global position/attitude estimate from a vision source."]
32780    #[doc = ""]
32781    #[doc = "ID: 101"]
32782    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32783    #[doc = "Second GPS data."]
32784    #[doc = ""]
32785    #[doc = "ID: 124"]
32786    GPS2_RAW(GPS2_RAW_DATA),
32787    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32788    #[doc = ""]
32789    #[doc = "ID: 128"]
32790    GPS2_RTK(GPS2_RTK_DATA),
32791    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32792    #[doc = ""]
32793    #[doc = "ID: 49"]
32794    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32795    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32796    #[doc = ""]
32797    #[doc = "ID: 123"]
32798    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32799    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32800    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32801    #[doc = ""]
32802    #[doc = "ID: 232"]
32803    GPS_INPUT(GPS_INPUT_DATA),
32804    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32805    #[doc = ""]
32806    #[doc = "ID: 24"]
32807    GPS_RAW_INT(GPS_RAW_INT_DATA),
32808    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32809    #[doc = ""]
32810    #[doc = "ID: 233"]
32811    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32812    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32813    #[doc = ""]
32814    #[doc = "ID: 127"]
32815    GPS_RTK(GPS_RTK_DATA),
32816    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32817    #[doc = ""]
32818    #[doc = "ID: 25"]
32819    GPS_STATUS(GPS_STATUS_DATA),
32820    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32821    #[doc = ""]
32822    #[doc = "ID: 0"]
32823    HEARTBEAT(HEARTBEAT_DATA),
32824    #[doc = "The IMU readings in SI units in NED body frame."]
32825    #[doc = ""]
32826    #[doc = "ID: 105"]
32827    HIGHRES_IMU(HIGHRES_IMU_DATA),
32828    #[doc = "Message appropriate for high latency connections like Iridium."]
32829    #[doc = ""]
32830    #[doc = "ID: 234"]
32831    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32832    HIGH_LATENCY(HIGH_LATENCY_DATA),
32833    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32834    #[doc = ""]
32835    #[doc = "ID: 235"]
32836    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32837    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32838    #[doc = ""]
32839    #[doc = "ID: 93"]
32840    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32841    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32842    #[doc = ""]
32843    #[doc = "ID: 91"]
32844    HIL_CONTROLS(HIL_CONTROLS_DATA),
32845    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32846    #[doc = ""]
32847    #[doc = "ID: 113"]
32848    HIL_GPS(HIL_GPS_DATA),
32849    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32850    #[doc = ""]
32851    #[doc = "ID: 114"]
32852    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32853    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32854    #[doc = ""]
32855    #[doc = "ID: 92"]
32856    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32857    #[doc = "The IMU readings in SI units in NED body frame."]
32858    #[doc = ""]
32859    #[doc = "ID: 107"]
32860    HIL_SENSOR(HIL_SENSOR_DATA),
32861    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32862    #[doc = ""]
32863    #[doc = "ID: 90"]
32864    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32865    HIL_STATE(HIL_STATE_DATA),
32866    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32867    #[doc = ""]
32868    #[doc = "ID: 115"]
32869    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32870    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32871    #[doc = ""]
32872    #[doc = "ID: 242"]
32873    HOME_POSITION(HOME_POSITION_DATA),
32874    #[doc = "Temperature and humidity from hygrometer."]
32875    #[doc = ""]
32876    #[doc = "ID: 12920"]
32877    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32878    #[doc = "Illuminator status."]
32879    #[doc = ""]
32880    #[doc = "ID: 440"]
32881    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32882    #[doc = "Status of the Iridium SBD link."]
32883    #[doc = ""]
32884    #[doc = "ID: 335"]
32885    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32886    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32887    #[doc = ""]
32888    #[doc = "ID: 149"]
32889    LANDING_TARGET(LANDING_TARGET_DATA),
32890    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32891    #[doc = ""]
32892    #[doc = "ID: 8"]
32893    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32894    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32895    #[doc = ""]
32896    #[doc = "ID: 32"]
32897    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32898    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32899    #[doc = ""]
32900    #[doc = "ID: 64"]
32901    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32902    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32903    #[doc = ""]
32904    #[doc = "ID: 89"]
32905    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32906    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32907    #[doc = ""]
32908    #[doc = "ID: 268"]
32909    LOGGING_ACK(LOGGING_ACK_DATA),
32910    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32911    #[doc = ""]
32912    #[doc = "ID: 266"]
32913    LOGGING_DATA(LOGGING_DATA_DATA),
32914    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32915    #[doc = ""]
32916    #[doc = "ID: 267"]
32917    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32918    #[doc = "Reply to LOG_REQUEST_DATA."]
32919    #[doc = ""]
32920    #[doc = "ID: 120"]
32921    LOG_DATA(LOG_DATA_DATA),
32922    #[doc = "Reply to LOG_REQUEST_LIST."]
32923    #[doc = ""]
32924    #[doc = "ID: 118"]
32925    LOG_ENTRY(LOG_ENTRY_DATA),
32926    #[doc = "Erase all logs."]
32927    #[doc = ""]
32928    #[doc = "ID: 121"]
32929    LOG_ERASE(LOG_ERASE_DATA),
32930    #[doc = "Request a chunk of a log."]
32931    #[doc = ""]
32932    #[doc = "ID: 119"]
32933    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
32934    #[doc = "Stop log transfer and resume normal logging."]
32935    #[doc = ""]
32936    #[doc = "ID: 122"]
32937    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
32938    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
32939    #[doc = ""]
32940    #[doc = "ID: 117"]
32941    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
32942    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
32943    #[doc = ""]
32944    #[doc = "ID: 192"]
32945    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
32946    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
32947    #[doc = ""]
32948    #[doc = "ID: 69"]
32949    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
32950    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
32951    #[doc = ""]
32952    #[doc = "ID: 81"]
32953    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
32954    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32955    #[doc = ""]
32956    #[doc = "ID: 249"]
32957    MEMORY_VECT(MEMORY_VECT_DATA),
32958    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
32959    #[doc = ""]
32960    #[doc = "ID: 244"]
32961    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
32962    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
32963    #[doc = ""]
32964    #[doc = "ID: 47"]
32965    MISSION_ACK(MISSION_ACK_DATA),
32966    #[doc = "Delete all mission items at once."]
32967    #[doc = ""]
32968    #[doc = "ID: 45"]
32969    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
32970    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
32971    #[doc = ""]
32972    #[doc = "ID: 44"]
32973    MISSION_COUNT(MISSION_COUNT_DATA),
32974    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
32975    #[doc = ""]
32976    #[doc = "ID: 42"]
32977    MISSION_CURRENT(MISSION_CURRENT_DATA),
32978    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32979    #[doc = ""]
32980    #[doc = "ID: 39"]
32981    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
32982    MISSION_ITEM(MISSION_ITEM_DATA),
32983    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32984    #[doc = ""]
32985    #[doc = "ID: 73"]
32986    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
32987    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
32988    #[doc = ""]
32989    #[doc = "ID: 46"]
32990    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
32991    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
32992    #[doc = ""]
32993    #[doc = "ID: 40"]
32994    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
32995    MISSION_REQUEST(MISSION_REQUEST_DATA),
32996    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
32997    #[doc = ""]
32998    #[doc = "ID: 51"]
32999    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33000    #[doc = "Request the overall list of mission items from the system/component."]
33001    #[doc = ""]
33002    #[doc = "ID: 43"]
33003    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33004    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33005    #[doc = ""]
33006    #[doc = "ID: 37"]
33007    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33008    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33009    #[doc = ""]
33010    #[doc = "ID: 41"]
33011    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33012    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33013    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33014    #[doc = ""]
33015    #[doc = "ID: 38"]
33016    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33017    #[doc = "Orientation of a mount."]
33018    #[doc = ""]
33019    #[doc = "ID: 265"]
33020    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33021    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33022    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33023    #[doc = ""]
33024    #[doc = "ID: 251"]
33025    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33026    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33027    #[doc = ""]
33028    #[doc = "ID: 252"]
33029    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33030    #[doc = "The state of the navigation and position controller."]
33031    #[doc = ""]
33032    #[doc = "ID: 62"]
33033    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33034    #[doc = "Accelerometer and Gyro biases from the navigation filter."]
33035    #[doc = ""]
33036    #[doc = "ID: 220"]
33037    NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA),
33038    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33039    #[doc = ""]
33040    #[doc = "ID: 330"]
33041    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33042    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33043    #[doc = ""]
33044    #[doc = "ID: 331"]
33045    ODOMETRY(ODOMETRY_DATA),
33046    #[doc = "Hardware status sent by an onboard computer."]
33047    #[doc = ""]
33048    #[doc = "ID: 390"]
33049    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33050    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33051    #[doc = ""]
33052    #[doc = "ID: 12918"]
33053    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33054    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33055    #[doc = ""]
33056    #[doc = "ID: 12902"]
33057    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33058    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33059    #[doc = ""]
33060    #[doc = "ID: 12900"]
33061    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33062    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33063    #[doc = ""]
33064    #[doc = "ID: 12901"]
33065    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33066    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33067    #[doc = ""]
33068    #[doc = "ID: 12915"]
33069    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33070    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33071    #[doc = ""]
33072    #[doc = "ID: 12905"]
33073    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33074    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33075    #[doc = ""]
33076    #[doc = "ID: 12903"]
33077    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33078    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33079    #[doc = ""]
33080    #[doc = "ID: 12904"]
33081    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33082    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33083    #[doc = ""]
33084    #[doc = "ID: 12919"]
33085    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33086    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33087    #[doc = ""]
33088    #[doc = "ID: 100"]
33089    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33090    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33091    #[doc = ""]
33092    #[doc = "ID: 106"]
33093    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33094    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33095    #[doc = ""]
33096    #[doc = "ID: 360"]
33097    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33098    #[doc = "Response from a PARAM_EXT_SET message."]
33099    #[doc = ""]
33100    #[doc = "ID: 324"]
33101    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33102    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33103    #[doc = ""]
33104    #[doc = "ID: 321"]
33105    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33106    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33107    #[doc = ""]
33108    #[doc = "ID: 320"]
33109    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33110    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33111    #[doc = ""]
33112    #[doc = "ID: 323"]
33113    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33114    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33115    #[doc = ""]
33116    #[doc = "ID: 322"]
33117    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33118    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33119    #[doc = ""]
33120    #[doc = "ID: 50"]
33121    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33122    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33123    #[doc = ""]
33124    #[doc = "ID: 21"]
33125    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33126    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33127    #[doc = ""]
33128    #[doc = "ID: 20"]
33129    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33130    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33131    #[doc = ""]
33132    #[doc = "ID: 23"]
33133    PARAM_SET(PARAM_SET_DATA),
33134    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33135    #[doc = ""]
33136    #[doc = "ID: 22"]
33137    PARAM_VALUE(PARAM_VALUE_DATA),
33138    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33139    #[doc = ""]
33140    #[doc = "ID: 4"]
33141    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33142    PING(PING_DATA),
33143    #[doc = "Control vehicle tone generation (buzzer)."]
33144    #[doc = ""]
33145    #[doc = "ID: 258"]
33146    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33147    PLAY_TUNE(PLAY_TUNE_DATA),
33148    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33149    #[doc = ""]
33150    #[doc = "ID: 400"]
33151    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33152    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33153    #[doc = ""]
33154    #[doc = "ID: 87"]
33155    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33156    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33157    #[doc = ""]
33158    #[doc = "ID: 85"]
33159    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33160    #[doc = "Power supply status."]
33161    #[doc = ""]
33162    #[doc = "ID: 125"]
33163    POWER_STATUS(POWER_STATUS_DATA),
33164    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33165    #[doc = ""]
33166    #[doc = "ID: 300"]
33167    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33168    #[doc = "Complete set of calibration parameters for the radio."]
33169    #[doc = ""]
33170    #[doc = "ID: 221"]
33171    RADIO_CALIBRATION(RADIO_CALIBRATION_DATA),
33172    #[doc = "Status generated by radio and injected into MAVLink stream."]
33173    #[doc = ""]
33174    #[doc = "ID: 109"]
33175    RADIO_STATUS(RADIO_STATUS_DATA),
33176    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33177    #[doc = ""]
33178    #[doc = "ID: 27"]
33179    RAW_IMU(RAW_IMU_DATA),
33180    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33181    #[doc = ""]
33182    #[doc = "ID: 28"]
33183    RAW_PRESSURE(RAW_PRESSURE_DATA),
33184    #[doc = "RPM sensor data message."]
33185    #[doc = ""]
33186    #[doc = "ID: 339"]
33187    RAW_RPM(RAW_RPM_DATA),
33188    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33189    #[doc = ""]
33190    #[doc = "ID: 65"]
33191    RC_CHANNELS(RC_CHANNELS_DATA),
33192    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33193    #[doc = ""]
33194    #[doc = "ID: 70"]
33195    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33196    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33197    #[doc = ""]
33198    #[doc = "ID: 35"]
33199    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33200    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33201    #[doc = ""]
33202    #[doc = "ID: 34"]
33203    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33204    #[doc = "Request a data stream."]
33205    #[doc = ""]
33206    #[doc = "ID: 66"]
33207    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33208    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33209    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33210    #[doc = ""]
33211    #[doc = "ID: 412"]
33212    REQUEST_EVENT(REQUEST_EVENT_DATA),
33213    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33214    #[doc = ""]
33215    #[doc = "ID: 142"]
33216    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33217    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33218    #[doc = ""]
33219    #[doc = "ID: 413"]
33220    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33221    #[doc = "Read out the safety zone the MAV currently assumes."]
33222    #[doc = ""]
33223    #[doc = "ID: 55"]
33224    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33225    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33226    #[doc = ""]
33227    #[doc = "ID: 54"]
33228    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33229    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33230    #[doc = ""]
33231    #[doc = "ID: 26"]
33232    SCALED_IMU(SCALED_IMU_DATA),
33233    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33234    #[doc = ""]
33235    #[doc = "ID: 116"]
33236    SCALED_IMU2(SCALED_IMU2_DATA),
33237    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33238    #[doc = ""]
33239    #[doc = "ID: 129"]
33240    SCALED_IMU3(SCALED_IMU3_DATA),
33241    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33242    #[doc = ""]
33243    #[doc = "ID: 29"]
33244    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33245    #[doc = "Barometer readings for 2nd barometer."]
33246    #[doc = ""]
33247    #[doc = "ID: 137"]
33248    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33249    #[doc = "Barometer readings for 3rd barometer."]
33250    #[doc = ""]
33251    #[doc = "ID: 143"]
33252    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33253    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33254    #[doc = ""]
33255    #[doc = "ID: 126"]
33256    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33257    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33258    #[doc = ""]
33259    #[doc = "ID: 36"]
33260    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33261    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33262    #[doc = ""]
33263    #[doc = "ID: 256"]
33264    SETUP_SIGNING(SETUP_SIGNING_DATA),
33265    #[doc = "Set the vehicle attitude and body angular rates."]
33266    #[doc = ""]
33267    #[doc = "ID: 139"]
33268    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33269    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33270    #[doc = ""]
33271    #[doc = "ID: 82"]
33272    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33273    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33274    #[doc = ""]
33275    #[doc = "ID: 48"]
33276    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33277    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33278    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33279    #[doc = ""]
33280    #[doc = "ID: 243"]
33281    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33282    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33283    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33284    #[doc = ""]
33285    #[doc = "ID: 11"]
33286    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33287    SET_MODE(SET_MODE_DATA),
33288    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33289    #[doc = ""]
33290    #[doc = "ID: 86"]
33291    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33292    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33293    #[doc = ""]
33294    #[doc = "ID: 84"]
33295    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33296    #[doc = "Status of simulation environment, if used."]
33297    #[doc = ""]
33298    #[doc = "ID: 108"]
33299    SIM_STATE(SIM_STATE_DATA),
33300    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33301    #[doc = ""]
33302    #[doc = "ID: 370"]
33303    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33304    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33305    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33306    #[doc = ""]
33307    #[doc = "ID: 253"]
33308    STATUSTEXT(STATUSTEXT_DATA),
33309    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33310    #[doc = ""]
33311    #[doc = "ID: 261"]
33312    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33313    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33314    #[doc = ""]
33315    #[doc = "ID: 401"]
33316    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33317    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33318    #[doc = ""]
33319    #[doc = "ID: 2"]
33320    SYSTEM_TIME(SYSTEM_TIME_DATA),
33321    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33322    #[doc = ""]
33323    #[doc = "ID: 1"]
33324    SYS_STATUS(SYS_STATUS_DATA),
33325    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33326    #[doc = ""]
33327    #[doc = "ID: 135"]
33328    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33329    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33330    #[doc = ""]
33331    #[doc = "ID: 134"]
33332    TERRAIN_DATA(TERRAIN_DATA_DATA),
33333    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33334    #[doc = ""]
33335    #[doc = "ID: 136"]
33336    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33337    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33338    #[doc = ""]
33339    #[doc = "ID: 133"]
33340    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33341    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33342    #[doc = ""]
33343    #[doc = "ID: 111"]
33344    TIMESYNC(TIMESYNC_DATA),
33345    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33346    #[doc = ""]
33347    #[doc = "ID: 380"]
33348    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33349    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33350    #[doc = ""]
33351    #[doc = "ID: 333"]
33352    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33353    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33354    #[doc = ""]
33355    #[doc = "ID: 332"]
33356    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33357    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33358    #[doc = ""]
33359    #[doc = "ID: 385"]
33360    TUNNEL(TUNNEL_DATA),
33361    #[doc = "System status specific to ualberta uav."]
33362    #[doc = ""]
33363    #[doc = "ID: 222"]
33364    UALBERTA_SYS_STATUS(UALBERTA_SYS_STATUS_DATA),
33365    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33366    #[doc = ""]
33367    #[doc = "ID: 311"]
33368    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33369    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33370    #[doc = ""]
33371    #[doc = "ID: 310"]
33372    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33373    #[doc = "The global position resulting from GPS and sensor fusion."]
33374    #[doc = ""]
33375    #[doc = "ID: 340"]
33376    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33377    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33378    #[doc = ""]
33379    #[doc = "ID: 248"]
33380    V2_EXTENSION(V2_EXTENSION_DATA),
33381    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33382    #[doc = ""]
33383    #[doc = "ID: 74"]
33384    VFR_HUD(VFR_HUD_DATA),
33385    #[doc = "Vibration levels and accelerometer clipping."]
33386    #[doc = ""]
33387    #[doc = "ID: 241"]
33388    VIBRATION(VIBRATION_DATA),
33389    #[doc = "Global position estimate from a Vicon motion system source."]
33390    #[doc = ""]
33391    #[doc = "ID: 104"]
33392    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33393    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33394    #[doc = ""]
33395    #[doc = "ID: 269"]
33396    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33397    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33398    #[doc = ""]
33399    #[doc = "ID: 270"]
33400    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33401    #[doc = "Local position/attitude estimate from a vision source."]
33402    #[doc = ""]
33403    #[doc = "ID: 102"]
33404    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33405    #[doc = "Speed estimate from a vision source."]
33406    #[doc = ""]
33407    #[doc = "ID: 103"]
33408    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33409    #[doc = "Cumulative distance traveled for each reported wheel."]
33410    #[doc = ""]
33411    #[doc = "ID: 9000"]
33412    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33413    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33414    #[doc = ""]
33415    #[doc = "ID: 299"]
33416    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33417    #[doc = "Winch status."]
33418    #[doc = ""]
33419    #[doc = "ID: 9005"]
33420    WINCH_STATUS(WINCH_STATUS_DATA),
33421    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33422    #[doc = ""]
33423    #[doc = "ID: 231"]
33424    WIND_COV(WIND_COV_DATA),
33425}
33426impl MavMessage {
33427    pub const fn all_ids() -> &'static [u32] {
33428        &[
33429            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33430            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33431            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33432            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33433            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33434            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33435            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33436            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33437            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33438            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33439            148u32, 149u32, 162u32, 192u32, 220u32, 221u32, 222u32, 225u32, 230u32, 231u32, 232u32,
33440            233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32,
33441            249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32,
33442            261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32,
33443            275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32,
33444            288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32,
33445            323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32,
33446            350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32,
33447            388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32,
33448            435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32,
33449            12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
33450        ]
33451    }
33452}
33453impl Message for MavMessage {
33454    fn parse(
33455        version: MavlinkVersion,
33456        id: u32,
33457        payload: &[u8],
33458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33459        match id {
33460            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33461                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33462                    .map(Self::ACTUATOR_CONTROL_TARGET)
33463            }
33464            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33465                .map(Self::ACTUATOR_OUTPUT_STATUS),
33466            ADSB_VEHICLE_DATA::ID => {
33467                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33468            }
33469            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33470            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33471            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33472            ATTITUDE_QUATERNION_DATA::ID => {
33473                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33474            }
33475            ATTITUDE_QUATERNION_COV_DATA::ID => {
33476                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33477                    .map(Self::ATTITUDE_QUATERNION_COV)
33478            }
33479            ATTITUDE_TARGET_DATA::ID => {
33480                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33481            }
33482            ATT_POS_MOCAP_DATA::ID => {
33483                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33484            }
33485            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33486            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33487                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33488                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33489            }
33490            AUTOPILOT_VERSION_DATA::ID => {
33491                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33492            }
33493            AVAILABLE_MODES_DATA::ID => {
33494                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33495            }
33496            AVAILABLE_MODES_MONITOR_DATA::ID => {
33497                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33498                    .map(Self::AVAILABLE_MODES_MONITOR)
33499            }
33500            BATTERY_INFO_DATA::ID => {
33501                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33502            }
33503            BATTERY_STATUS_DATA::ID => {
33504                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33505            }
33506            BUTTON_CHANGE_DATA::ID => {
33507                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33508            }
33509            CAMERA_CAPTURE_STATUS_DATA::ID => {
33510                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33511            }
33512            CAMERA_FOV_STATUS_DATA::ID => {
33513                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33514            }
33515            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33516                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33517            }
33518            CAMERA_INFORMATION_DATA::ID => {
33519                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33520            }
33521            CAMERA_SETTINGS_DATA::ID => {
33522                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33523            }
33524            CAMERA_THERMAL_RANGE_DATA::ID => {
33525                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33526            }
33527            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33528                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33529                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33530            }
33531            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33532                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33533                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33534            }
33535            CAMERA_TRIGGER_DATA::ID => {
33536                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33537            }
33538            CANFD_FRAME_DATA::ID => {
33539                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33540            }
33541            CAN_FILTER_MODIFY_DATA::ID => {
33542                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33543            }
33544            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33545            CELLULAR_CONFIG_DATA::ID => {
33546                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33547            }
33548            CELLULAR_STATUS_DATA::ID => {
33549                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33550            }
33551            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33552                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33553                    .map(Self::CHANGE_OPERATOR_CONTROL)
33554            }
33555            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33556                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33557                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33558            }
33559            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33560            COMMAND_ACK_DATA::ID => {
33561                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33562            }
33563            COMMAND_CANCEL_DATA::ID => {
33564                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33565            }
33566            COMMAND_INT_DATA::ID => {
33567                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33568            }
33569            COMMAND_LONG_DATA::ID => {
33570                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33571            }
33572            COMPONENT_INFORMATION_DATA::ID => {
33573                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33574            }
33575            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33576                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33577                    .map(Self::COMPONENT_INFORMATION_BASIC)
33578            }
33579            COMPONENT_METADATA_DATA::ID => {
33580                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33581            }
33582            CONTROL_SYSTEM_STATE_DATA::ID => {
33583                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33584            }
33585            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33586                .map(Self::CURRENT_EVENT_SEQUENCE),
33587            CURRENT_MODE_DATA::ID => {
33588                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33589            }
33590            DATA_STREAM_DATA::ID => {
33591                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33592            }
33593            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33594                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33595                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33596            }
33597            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33598            DEBUG_FLOAT_ARRAY_DATA::ID => {
33599                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33600            }
33601            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33602            DISTANCE_SENSOR_DATA::ID => {
33603                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33604            }
33605            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33606            ENCAPSULATED_DATA_DATA::ID => {
33607                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33608            }
33609            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33610            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33611            ESTIMATOR_STATUS_DATA::ID => {
33612                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33613            }
33614            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33615            EXTENDED_SYS_STATE_DATA::ID => {
33616                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33617            }
33618            FENCE_STATUS_DATA::ID => {
33619                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33620            }
33621            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33622                .map(Self::FILE_TRANSFER_PROTOCOL),
33623            FLIGHT_INFORMATION_DATA::ID => {
33624                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33625            }
33626            FOLLOW_TARGET_DATA::ID => {
33627                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33628            }
33629            FUEL_STATUS_DATA::ID => {
33630                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33631            }
33632            GENERATOR_STATUS_DATA::ID => {
33633                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33634            }
33635            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33636                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33637                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33638            }
33639            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33640                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33641                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33642            }
33643            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33644                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33645                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33646            }
33647            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33648                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33649                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33650            }
33651            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33652                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33653                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33654            }
33655            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33656                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33657                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33658            }
33659            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33660                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33661                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33662            }
33663            GIMBAL_MANAGER_STATUS_DATA::ID => {
33664                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33665            }
33666            GLOBAL_POSITION_INT_DATA::ID => {
33667                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33668            }
33669            GLOBAL_POSITION_INT_COV_DATA::ID => {
33670                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33671                    .map(Self::GLOBAL_POSITION_INT_COV)
33672            }
33673            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33674                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33675                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33676            }
33677            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33678            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33679            GPS_GLOBAL_ORIGIN_DATA::ID => {
33680                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33681            }
33682            GPS_INJECT_DATA_DATA::ID => {
33683                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33684            }
33685            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33686            GPS_RAW_INT_DATA::ID => {
33687                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33688            }
33689            GPS_RTCM_DATA_DATA::ID => {
33690                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33691            }
33692            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33693            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33694            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33695            HIGHRES_IMU_DATA::ID => {
33696                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33697            }
33698            HIGH_LATENCY_DATA::ID => {
33699                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33700            }
33701            HIGH_LATENCY2_DATA::ID => {
33702                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33703            }
33704            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33705                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33706            }
33707            HIL_CONTROLS_DATA::ID => {
33708                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33709            }
33710            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33711            HIL_OPTICAL_FLOW_DATA::ID => {
33712                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33713            }
33714            HIL_RC_INPUTS_RAW_DATA::ID => {
33715                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33716            }
33717            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33718            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33719            HIL_STATE_QUATERNION_DATA::ID => {
33720                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33721            }
33722            HOME_POSITION_DATA::ID => {
33723                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33724            }
33725            HYGROMETER_SENSOR_DATA::ID => {
33726                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33727            }
33728            ILLUMINATOR_STATUS_DATA::ID => {
33729                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33730            }
33731            ISBD_LINK_STATUS_DATA::ID => {
33732                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33733            }
33734            LANDING_TARGET_DATA::ID => {
33735                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33736            }
33737            LINK_NODE_STATUS_DATA::ID => {
33738                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33739            }
33740            LOCAL_POSITION_NED_DATA::ID => {
33741                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33742            }
33743            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33744                .map(Self::LOCAL_POSITION_NED_COV),
33745            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33746                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33747                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33748            }
33749            LOGGING_ACK_DATA::ID => {
33750                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33751            }
33752            LOGGING_DATA_DATA::ID => {
33753                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33754            }
33755            LOGGING_DATA_ACKED_DATA::ID => {
33756                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33757            }
33758            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33759            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33760            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33761            LOG_REQUEST_DATA_DATA::ID => {
33762                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33763            }
33764            LOG_REQUEST_END_DATA::ID => {
33765                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33766            }
33767            LOG_REQUEST_LIST_DATA::ID => {
33768                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33769            }
33770            MAG_CAL_REPORT_DATA::ID => {
33771                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33772            }
33773            MANUAL_CONTROL_DATA::ID => {
33774                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33775            }
33776            MANUAL_SETPOINT_DATA::ID => {
33777                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33778            }
33779            MEMORY_VECT_DATA::ID => {
33780                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33781            }
33782            MESSAGE_INTERVAL_DATA::ID => {
33783                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33784            }
33785            MISSION_ACK_DATA::ID => {
33786                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33787            }
33788            MISSION_CLEAR_ALL_DATA::ID => {
33789                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33790            }
33791            MISSION_COUNT_DATA::ID => {
33792                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33793            }
33794            MISSION_CURRENT_DATA::ID => {
33795                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33796            }
33797            MISSION_ITEM_DATA::ID => {
33798                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33799            }
33800            MISSION_ITEM_INT_DATA::ID => {
33801                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33802            }
33803            MISSION_ITEM_REACHED_DATA::ID => {
33804                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33805            }
33806            MISSION_REQUEST_DATA::ID => {
33807                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33808            }
33809            MISSION_REQUEST_INT_DATA::ID => {
33810                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33811            }
33812            MISSION_REQUEST_LIST_DATA::ID => {
33813                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33814            }
33815            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33816                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33817                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33818            }
33819            MISSION_SET_CURRENT_DATA::ID => {
33820                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33821            }
33822            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33823                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33824                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33825            }
33826            MOUNT_ORIENTATION_DATA::ID => {
33827                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33828            }
33829            NAMED_VALUE_FLOAT_DATA::ID => {
33830                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33831            }
33832            NAMED_VALUE_INT_DATA::ID => {
33833                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33834            }
33835            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33836                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33837            }
33838            NAV_FILTER_BIAS_DATA::ID => {
33839                NAV_FILTER_BIAS_DATA::deser(version, payload).map(Self::NAV_FILTER_BIAS)
33840            }
33841            OBSTACLE_DISTANCE_DATA::ID => {
33842                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33843            }
33844            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33845            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33846                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33847                    .map(Self::ONBOARD_COMPUTER_STATUS)
33848            }
33849            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33850                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33851                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33852            }
33853            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33854                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33855                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33856            }
33857            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33858                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33859            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33860                .map(Self::OPEN_DRONE_ID_LOCATION),
33861            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33862                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33863                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33864            }
33865            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33866                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33867                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33868            }
33869            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33870                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33871            }
33872            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33873                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33874            }
33875            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
33876                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
33877                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
33878            }
33879            OPTICAL_FLOW_DATA::ID => {
33880                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
33881            }
33882            OPTICAL_FLOW_RAD_DATA::ID => {
33883                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
33884            }
33885            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
33886                .map(Self::ORBIT_EXECUTION_STATUS),
33887            PARAM_EXT_ACK_DATA::ID => {
33888                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
33889            }
33890            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
33891                .map(Self::PARAM_EXT_REQUEST_LIST),
33892            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
33893                .map(Self::PARAM_EXT_REQUEST_READ),
33894            PARAM_EXT_SET_DATA::ID => {
33895                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
33896            }
33897            PARAM_EXT_VALUE_DATA::ID => {
33898                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
33899            }
33900            PARAM_MAP_RC_DATA::ID => {
33901                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
33902            }
33903            PARAM_REQUEST_LIST_DATA::ID => {
33904                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
33905            }
33906            PARAM_REQUEST_READ_DATA::ID => {
33907                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
33908            }
33909            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
33910            PARAM_VALUE_DATA::ID => {
33911                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
33912            }
33913            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
33914            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
33915            PLAY_TUNE_V2_DATA::ID => {
33916                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
33917            }
33918            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33919                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33920                    .map(Self::POSITION_TARGET_GLOBAL_INT)
33921            }
33922            POSITION_TARGET_LOCAL_NED_DATA::ID => {
33923                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33924                    .map(Self::POSITION_TARGET_LOCAL_NED)
33925            }
33926            POWER_STATUS_DATA::ID => {
33927                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
33928            }
33929            PROTOCOL_VERSION_DATA::ID => {
33930                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
33931            }
33932            RADIO_CALIBRATION_DATA::ID => {
33933                RADIO_CALIBRATION_DATA::deser(version, payload).map(Self::RADIO_CALIBRATION)
33934            }
33935            RADIO_STATUS_DATA::ID => {
33936                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
33937            }
33938            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
33939            RAW_PRESSURE_DATA::ID => {
33940                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
33941            }
33942            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
33943            RC_CHANNELS_DATA::ID => {
33944                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
33945            }
33946            RC_CHANNELS_OVERRIDE_DATA::ID => {
33947                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
33948            }
33949            RC_CHANNELS_RAW_DATA::ID => {
33950                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
33951            }
33952            RC_CHANNELS_SCALED_DATA::ID => {
33953                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
33954            }
33955            REQUEST_DATA_STREAM_DATA::ID => {
33956                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
33957            }
33958            REQUEST_EVENT_DATA::ID => {
33959                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
33960            }
33961            RESOURCE_REQUEST_DATA::ID => {
33962                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
33963            }
33964            RESPONSE_EVENT_ERROR_DATA::ID => {
33965                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
33966            }
33967            SAFETY_ALLOWED_AREA_DATA::ID => {
33968                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
33969            }
33970            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
33971                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
33972                    .map(Self::SAFETY_SET_ALLOWED_AREA)
33973            }
33974            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
33975            SCALED_IMU2_DATA::ID => {
33976                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
33977            }
33978            SCALED_IMU3_DATA::ID => {
33979                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
33980            }
33981            SCALED_PRESSURE_DATA::ID => {
33982                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
33983            }
33984            SCALED_PRESSURE2_DATA::ID => {
33985                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
33986            }
33987            SCALED_PRESSURE3_DATA::ID => {
33988                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
33989            }
33990            SERIAL_CONTROL_DATA::ID => {
33991                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
33992            }
33993            SERVO_OUTPUT_RAW_DATA::ID => {
33994                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
33995            }
33996            SETUP_SIGNING_DATA::ID => {
33997                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
33998            }
33999            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34000                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34001                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34002            }
34003            SET_ATTITUDE_TARGET_DATA::ID => {
34004                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34005            }
34006            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34007                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34008            }
34009            SET_HOME_POSITION_DATA::ID => {
34010                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34011            }
34012            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34013            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34014                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34015                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34016            }
34017            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34018                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34019                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34020            }
34021            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34022            SMART_BATTERY_INFO_DATA::ID => {
34023                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34024            }
34025            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34026            STORAGE_INFORMATION_DATA::ID => {
34027                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34028            }
34029            SUPPORTED_TUNES_DATA::ID => {
34030                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34031            }
34032            SYSTEM_TIME_DATA::ID => {
34033                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34034            }
34035            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34036            TERRAIN_CHECK_DATA::ID => {
34037                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34038            }
34039            TERRAIN_DATA_DATA::ID => {
34040                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34041            }
34042            TERRAIN_REPORT_DATA::ID => {
34043                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34044            }
34045            TERRAIN_REQUEST_DATA::ID => {
34046                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34047            }
34048            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34049            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34050                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34051                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34052            }
34053            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34054                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34055                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34056            }
34057            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34058                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34059                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34060            }
34061            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34062            UALBERTA_SYS_STATUS_DATA::ID => {
34063                UALBERTA_SYS_STATUS_DATA::deser(version, payload).map(Self::UALBERTA_SYS_STATUS)
34064            }
34065            UAVCAN_NODE_INFO_DATA::ID => {
34066                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34067            }
34068            UAVCAN_NODE_STATUS_DATA::ID => {
34069                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34070            }
34071            UTM_GLOBAL_POSITION_DATA::ID => {
34072                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34073            }
34074            V2_EXTENSION_DATA::ID => {
34075                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34076            }
34077            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34078            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34079            VICON_POSITION_ESTIMATE_DATA::ID => {
34080                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34081                    .map(Self::VICON_POSITION_ESTIMATE)
34082            }
34083            VIDEO_STREAM_INFORMATION_DATA::ID => {
34084                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34085                    .map(Self::VIDEO_STREAM_INFORMATION)
34086            }
34087            VIDEO_STREAM_STATUS_DATA::ID => {
34088                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34089            }
34090            VISION_POSITION_ESTIMATE_DATA::ID => {
34091                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34092                    .map(Self::VISION_POSITION_ESTIMATE)
34093            }
34094            VISION_SPEED_ESTIMATE_DATA::ID => {
34095                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34096            }
34097            WHEEL_DISTANCE_DATA::ID => {
34098                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34099            }
34100            WIFI_CONFIG_AP_DATA::ID => {
34101                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34102            }
34103            WINCH_STATUS_DATA::ID => {
34104                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34105            }
34106            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34107            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34108        }
34109    }
34110    fn message_name(&self) -> &'static str {
34111        match self {
34112            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34113            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34114            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34115            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34116            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34117            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34118            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34119            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34120            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34121            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34122            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34123            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34124                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34125            }
34126            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34127            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34128            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34129            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34130            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34131            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34132            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34133            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34134            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34135            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34136            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34137            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34138            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34139            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34140            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34141            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34142            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34143            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34144            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34145            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34146            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34147            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34148            Self::COLLISION(..) => COLLISION_DATA::NAME,
34149            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34150            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34151            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34152            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34153            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34154            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34155            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34156            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34157            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34158            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34159            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34160            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34161            Self::DEBUG(..) => DEBUG_DATA::NAME,
34162            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34163            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34164            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34165            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34166            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34167            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34168            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34169            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34170            Self::EVENT(..) => EVENT_DATA::NAME,
34171            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34172            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34173            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34174            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34175            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34176            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34177            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34178            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34179            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34180            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34181            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34182            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34183            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34184                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34185            }
34186            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34187            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34188            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34189            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34190            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34191            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34192            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34193            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34194            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34195            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34196            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34197            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34198            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34199            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34200            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34201            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34202            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34203            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34204            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34205            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34206            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34207            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34208            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34209            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34210            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34211            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34212            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34213            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34214            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34215            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34216            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34217            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34218            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34219            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34220            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34221                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34222            }
34223            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34224            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34225            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34226            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34227            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34228            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34229            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34230            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34231            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34232            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34233            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34234            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34235            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34236            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34237            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34238            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34239            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34240            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34241            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34242            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34243            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34244            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34245            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34246            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34247            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34248            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34249            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34250            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34251            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34252            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34253            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34254            Self::NAV_FILTER_BIAS(..) => NAV_FILTER_BIAS_DATA::NAME,
34255            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34256            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34257            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34258            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34259            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34260            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34261            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34262            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34263            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34264            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34265            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34266            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34267            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34268            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34269            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34270            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34271            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34272            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34273            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34274            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34275            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34276            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34277            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34278            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34279            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34280            Self::PING(..) => PING_DATA::NAME,
34281            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34282            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34283            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34284            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34285            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34286            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34287            Self::RADIO_CALIBRATION(..) => RADIO_CALIBRATION_DATA::NAME,
34288            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34289            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34290            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34291            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34292            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34293            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34294            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34295            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34296            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34297            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34298            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34299            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34300            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34301            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34302            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34303            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34304            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34305            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34306            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34307            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34308            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34309            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34310            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34311            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34312            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34313            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34314            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34315            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34316            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34317            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34318            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34319            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34320            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34321            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34322            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34323            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34324            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34325            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34326            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34327            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34328            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34329            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34330            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34331            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34332                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34333            }
34334            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34335                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34336            }
34337            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34338            Self::UALBERTA_SYS_STATUS(..) => UALBERTA_SYS_STATUS_DATA::NAME,
34339            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34340            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34341            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34342            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34343            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34344            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34345            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34346            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34347            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34348            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34349            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34350            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34351            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34352            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34353            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34354        }
34355    }
34356    fn message_id(&self) -> u32 {
34357        match self {
34358            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34359            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34360            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34361            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34362            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34363            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34364            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34365            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34366            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34367            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34368            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34369            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34370                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34371            }
34372            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34373            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34374            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34375            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34376            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34377            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34378            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34379            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34380            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34381            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34382            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34383            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34384            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34385            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34386            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34387            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34388            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34389            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34390            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34391            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34392            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34393            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34394            Self::COLLISION(..) => COLLISION_DATA::ID,
34395            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34396            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34397            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34398            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34399            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34400            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34401            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34402            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34403            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34404            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34405            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34406            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34407            Self::DEBUG(..) => DEBUG_DATA::ID,
34408            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34409            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34410            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34411            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34412            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34413            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34414            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34415            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34416            Self::EVENT(..) => EVENT_DATA::ID,
34417            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34418            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34419            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34420            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34421            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34422            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34423            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34424            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34425            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34426            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34427            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34428            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34429            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34430                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34431            }
34432            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34433            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34434            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34435            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34436            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34437            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34438            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34439            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34440            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34441            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34442            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34443            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34444            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34445            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34446            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34447            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34448            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34449            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34450            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34451            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34452            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34453            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34454            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34455            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34456            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34457            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34458            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34459            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34460            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34461            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34462            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34463            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34464            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34465            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34466            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34467                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34468            }
34469            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34470            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34471            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34472            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34473            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34474            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34475            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34476            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34477            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34478            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34479            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34480            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34481            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34482            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34483            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34484            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34485            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34486            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34487            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34488            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34489            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34490            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34491            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34492            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34493            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34494            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34495            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34496            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34497            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34498            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34499            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34500            Self::NAV_FILTER_BIAS(..) => NAV_FILTER_BIAS_DATA::ID,
34501            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34502            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34503            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34504            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34505            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34506            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34507            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34508            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34509            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34510            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34511            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34512            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34513            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34514            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34515            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34516            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34517            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34518            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34519            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34520            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34521            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34522            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34523            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34524            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34525            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34526            Self::PING(..) => PING_DATA::ID,
34527            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34528            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34529            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34530            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34531            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34532            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34533            Self::RADIO_CALIBRATION(..) => RADIO_CALIBRATION_DATA::ID,
34534            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34535            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34536            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34537            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34538            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34539            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34540            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34541            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34542            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34543            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34544            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34545            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34546            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34547            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34548            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34549            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34550            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34551            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34552            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34553            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34554            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34555            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34556            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34557            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34558            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34559            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34560            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34561            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34562            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34563            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34564            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34565            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34566            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34567            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34568            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34569            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34570            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34571            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34572            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34573            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34574            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34575            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34576            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34577            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34578            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34579                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34580            }
34581            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34582            Self::UALBERTA_SYS_STATUS(..) => UALBERTA_SYS_STATUS_DATA::ID,
34583            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34584            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34585            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34586            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34587            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34588            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34589            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34590            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34591            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34592            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34593            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34594            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34595            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34596            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34597            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34598        }
34599    }
34600    fn message_id_from_name(name: &str) -> Option<u32> {
34601        match name {
34602            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34603            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34604            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34605            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34606            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34607            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34608            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34609            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34610            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34611            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34612            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34613            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34614                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34615            }
34616            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34617            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34618            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34619            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34620            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34621            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34622            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34623            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34624            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34625            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34626            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34627            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34628            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34629            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34630            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34631            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34632            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34633            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34634            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34635            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34636            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34637            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34638            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34639            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34640            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34641            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34642            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34643            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34644            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34645            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34646            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34647            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34648            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34649            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34650            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34651            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34652            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34653            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34654            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34655            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34656            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34657            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34658            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34659            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34660            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34661            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34662            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34663            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34664            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34665            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34666            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34667            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34668            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34669                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34670            }
34671            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34672            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34673            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34674            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34675            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34676                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34677            }
34678            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34679            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34680            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34681            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34682            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34683                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34684            }
34685            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34686            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34687            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34688            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34689            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34690            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34691            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34692            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34693            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34694            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34695            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34696            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34697            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34698            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34699            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34700            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34701            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34702            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34703            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34704            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34705            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34706            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34707            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34708            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34709            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34710            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34711            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34712            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34713            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34714            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34715                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34716            }
34717            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34718            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34719            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34720            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34721            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34722            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34723            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34724            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34725            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34726            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34727            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34728            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34729            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34730            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34731            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34732            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34733            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34734            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34735            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34736            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34737            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34738            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34739            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34740            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34741            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34742            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34743            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34744            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34745            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34746            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34747            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34748            NAV_FILTER_BIAS_DATA::NAME => Some(NAV_FILTER_BIAS_DATA::ID),
34749            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34750            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34751            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34752            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34753            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34754            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34755            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34756            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34757            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34758            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34759            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34760            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34761            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34762            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34763            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34764            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34765            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34766            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34767            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34768            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34769            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34770            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34771            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34772            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34773            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34774            PING_DATA::NAME => Some(PING_DATA::ID),
34775            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34776            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34777            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34778            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34779            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34780            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34781            RADIO_CALIBRATION_DATA::NAME => Some(RADIO_CALIBRATION_DATA::ID),
34782            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34783            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34784            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34785            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34786            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34787            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34788            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34789            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34790            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34791            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34792            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34793            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34794            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34795            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34796            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34797            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34798            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34799            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34800            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34801            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34802            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34803            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34804            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34805            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34806            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34807            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34808            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34809            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34810            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34811                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34812            }
34813            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34814                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34815            }
34816            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34817            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34818            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34819            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34820            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34821            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34822            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34823            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34824            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34825            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34826            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34827            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34828            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34829            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34830                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34831            }
34832            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34833                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34834            }
34835            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34836            UALBERTA_SYS_STATUS_DATA::NAME => Some(UALBERTA_SYS_STATUS_DATA::ID),
34837            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34838            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34839            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34840            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34841            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34842            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34843            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34844            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34845            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34846            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34847            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34848            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34849            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34850            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34851            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34852            _ => None,
34853        }
34854    }
34855    fn default_message_from_id(id: u32) -> Option<Self> {
34856        match id {
34857            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34858                ACTUATOR_CONTROL_TARGET_DATA::default(),
34859            )),
34860            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34861                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34862            )),
34863            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34864            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34865            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34866            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34867            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34868                ATTITUDE_QUATERNION_DATA::default(),
34869            )),
34870            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34871                ATTITUDE_QUATERNION_COV_DATA::default(),
34872            )),
34873            ATTITUDE_TARGET_DATA::ID => {
34874                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34875            }
34876            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34877            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
34878            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34879                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34880                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
34881                ))
34882            }
34883            AUTOPILOT_VERSION_DATA::ID => {
34884                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
34885            }
34886            AVAILABLE_MODES_DATA::ID => {
34887                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
34888            }
34889            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34890                AVAILABLE_MODES_MONITOR_DATA::default(),
34891            )),
34892            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
34893            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
34894            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
34895            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34896                CAMERA_CAPTURE_STATUS_DATA::default(),
34897            )),
34898            CAMERA_FOV_STATUS_DATA::ID => {
34899                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
34900            }
34901            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34902                CAMERA_IMAGE_CAPTURED_DATA::default(),
34903            )),
34904            CAMERA_INFORMATION_DATA::ID => {
34905                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
34906            }
34907            CAMERA_SETTINGS_DATA::ID => {
34908                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
34909            }
34910            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34911                CAMERA_THERMAL_RANGE_DATA::default(),
34912            )),
34913            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
34914                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
34915            )),
34916            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
34917                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
34918            )),
34919            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
34920            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
34921            CAN_FILTER_MODIFY_DATA::ID => {
34922                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
34923            }
34924            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
34925            CELLULAR_CONFIG_DATA::ID => {
34926                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
34927            }
34928            CELLULAR_STATUS_DATA::ID => {
34929                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
34930            }
34931            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34932                CHANGE_OPERATOR_CONTROL_DATA::default(),
34933            )),
34934            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34935                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
34936            )),
34937            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
34938            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
34939            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
34940            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
34941            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
34942            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
34943                COMPONENT_INFORMATION_DATA::default(),
34944            )),
34945            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
34946                COMPONENT_INFORMATION_BASIC_DATA::default(),
34947            )),
34948            COMPONENT_METADATA_DATA::ID => {
34949                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
34950            }
34951            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
34952                CONTROL_SYSTEM_STATE_DATA::default(),
34953            )),
34954            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
34955                CURRENT_EVENT_SEQUENCE_DATA::default(),
34956            )),
34957            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
34958            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
34959            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
34960                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
34961            )),
34962            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
34963            DEBUG_FLOAT_ARRAY_DATA::ID => {
34964                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
34965            }
34966            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
34967            DISTANCE_SENSOR_DATA::ID => {
34968                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
34969            }
34970            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
34971            ENCAPSULATED_DATA_DATA::ID => {
34972                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
34973            }
34974            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
34975            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
34976            ESTIMATOR_STATUS_DATA::ID => {
34977                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
34978            }
34979            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
34980            EXTENDED_SYS_STATE_DATA::ID => {
34981                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
34982            }
34983            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
34984            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
34985                FILE_TRANSFER_PROTOCOL_DATA::default(),
34986            )),
34987            FLIGHT_INFORMATION_DATA::ID => {
34988                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
34989            }
34990            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
34991            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
34992            GENERATOR_STATUS_DATA::ID => {
34993                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
34994            }
34995            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
34996                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
34997            )),
34998            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
34999                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35000            )),
35001            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35002                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35003            )),
35004            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35005                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35006            )),
35007            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35008                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35009            )),
35010            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35011                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35012                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35013                ))
35014            }
35015            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35016                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35017            )),
35018            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35019                GIMBAL_MANAGER_STATUS_DATA::default(),
35020            )),
35021            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35022                GLOBAL_POSITION_INT_DATA::default(),
35023            )),
35024            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35025                GLOBAL_POSITION_INT_COV_DATA::default(),
35026            )),
35027            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35028                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35029                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35030                ))
35031            }
35032            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35033            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35034            GPS_GLOBAL_ORIGIN_DATA::ID => {
35035                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35036            }
35037            GPS_INJECT_DATA_DATA::ID => {
35038                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35039            }
35040            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35041            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35042            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35043            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35044            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35045            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35046            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35047            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35048            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35049            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35050                HIL_ACTUATOR_CONTROLS_DATA::default(),
35051            )),
35052            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35053            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35054            HIL_OPTICAL_FLOW_DATA::ID => {
35055                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35056            }
35057            HIL_RC_INPUTS_RAW_DATA::ID => {
35058                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35059            }
35060            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35061            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35062            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35063                HIL_STATE_QUATERNION_DATA::default(),
35064            )),
35065            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35066            HYGROMETER_SENSOR_DATA::ID => {
35067                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35068            }
35069            ILLUMINATOR_STATUS_DATA::ID => {
35070                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35071            }
35072            ISBD_LINK_STATUS_DATA::ID => {
35073                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35074            }
35075            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35076            LINK_NODE_STATUS_DATA::ID => {
35077                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35078            }
35079            LOCAL_POSITION_NED_DATA::ID => {
35080                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35081            }
35082            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35083                LOCAL_POSITION_NED_COV_DATA::default(),
35084            )),
35085            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35086                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35087                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35088                ))
35089            }
35090            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35091            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35092            LOGGING_DATA_ACKED_DATA::ID => {
35093                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35094            }
35095            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35096            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35097            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35098            LOG_REQUEST_DATA_DATA::ID => {
35099                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35100            }
35101            LOG_REQUEST_END_DATA::ID => {
35102                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35103            }
35104            LOG_REQUEST_LIST_DATA::ID => {
35105                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35106            }
35107            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35108            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35109            MANUAL_SETPOINT_DATA::ID => {
35110                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35111            }
35112            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35113            MESSAGE_INTERVAL_DATA::ID => {
35114                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35115            }
35116            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35117            MISSION_CLEAR_ALL_DATA::ID => {
35118                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35119            }
35120            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35121            MISSION_CURRENT_DATA::ID => {
35122                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35123            }
35124            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35125            MISSION_ITEM_INT_DATA::ID => {
35126                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35127            }
35128            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35129                MISSION_ITEM_REACHED_DATA::default(),
35130            )),
35131            MISSION_REQUEST_DATA::ID => {
35132                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35133            }
35134            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35135                MISSION_REQUEST_INT_DATA::default(),
35136            )),
35137            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35138                MISSION_REQUEST_LIST_DATA::default(),
35139            )),
35140            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35141                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35142            )),
35143            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35144                MISSION_SET_CURRENT_DATA::default(),
35145            )),
35146            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35147                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35148            )),
35149            MOUNT_ORIENTATION_DATA::ID => {
35150                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35151            }
35152            NAMED_VALUE_FLOAT_DATA::ID => {
35153                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35154            }
35155            NAMED_VALUE_INT_DATA::ID => {
35156                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35157            }
35158            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35159                NAV_CONTROLLER_OUTPUT_DATA::default(),
35160            )),
35161            NAV_FILTER_BIAS_DATA::ID => {
35162                Some(Self::NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA::default()))
35163            }
35164            OBSTACLE_DISTANCE_DATA::ID => {
35165                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35166            }
35167            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35168            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35169                ONBOARD_COMPUTER_STATUS_DATA::default(),
35170            )),
35171            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35172                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35173            )),
35174            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35175                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35176            )),
35177            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35178                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35179            )),
35180            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35181                OPEN_DRONE_ID_LOCATION_DATA::default(),
35182            )),
35183            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35184                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35185            )),
35186            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35187                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35188            )),
35189            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35190                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35191            )),
35192            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35193                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35194            )),
35195            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35196                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35197            )),
35198            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35199            OPTICAL_FLOW_RAD_DATA::ID => {
35200                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35201            }
35202            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35203                ORBIT_EXECUTION_STATUS_DATA::default(),
35204            )),
35205            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35206            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35207                PARAM_EXT_REQUEST_LIST_DATA::default(),
35208            )),
35209            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35210                PARAM_EXT_REQUEST_READ_DATA::default(),
35211            )),
35212            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35213            PARAM_EXT_VALUE_DATA::ID => {
35214                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35215            }
35216            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35217            PARAM_REQUEST_LIST_DATA::ID => {
35218                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35219            }
35220            PARAM_REQUEST_READ_DATA::ID => {
35221                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35222            }
35223            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35224            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35225            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35226            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35227            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35228            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35229                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35230            )),
35231            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35232                POSITION_TARGET_LOCAL_NED_DATA::default(),
35233            )),
35234            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35235            PROTOCOL_VERSION_DATA::ID => {
35236                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35237            }
35238            RADIO_CALIBRATION_DATA::ID => {
35239                Some(Self::RADIO_CALIBRATION(RADIO_CALIBRATION_DATA::default()))
35240            }
35241            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35242            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35243            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35244            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35245            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35246            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35247                RC_CHANNELS_OVERRIDE_DATA::default(),
35248            )),
35249            RC_CHANNELS_RAW_DATA::ID => {
35250                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35251            }
35252            RC_CHANNELS_SCALED_DATA::ID => {
35253                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35254            }
35255            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35256                REQUEST_DATA_STREAM_DATA::default(),
35257            )),
35258            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35259            RESOURCE_REQUEST_DATA::ID => {
35260                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35261            }
35262            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35263                RESPONSE_EVENT_ERROR_DATA::default(),
35264            )),
35265            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35266                SAFETY_ALLOWED_AREA_DATA::default(),
35267            )),
35268            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35269                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35270            )),
35271            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35272            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35273            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35274            SCALED_PRESSURE_DATA::ID => {
35275                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35276            }
35277            SCALED_PRESSURE2_DATA::ID => {
35278                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35279            }
35280            SCALED_PRESSURE3_DATA::ID => {
35281                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35282            }
35283            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35284            SERVO_OUTPUT_RAW_DATA::ID => {
35285                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35286            }
35287            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35288            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35289                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35290            )),
35291            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35292                SET_ATTITUDE_TARGET_DATA::default(),
35293            )),
35294            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35295                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35296            )),
35297            SET_HOME_POSITION_DATA::ID => {
35298                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35299            }
35300            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35301            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35302                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35303            )),
35304            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35305                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35306            )),
35307            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35308            SMART_BATTERY_INFO_DATA::ID => {
35309                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35310            }
35311            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35312            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35313                STORAGE_INFORMATION_DATA::default(),
35314            )),
35315            SUPPORTED_TUNES_DATA::ID => {
35316                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35317            }
35318            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35319            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35320            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35321            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35322            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35323            TERRAIN_REQUEST_DATA::ID => {
35324                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35325            }
35326            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35327            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35328                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35329            )),
35330            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35331                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35332                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35333                ))
35334            }
35335            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35336                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35337                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35338                ))
35339            }
35340            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35341            UALBERTA_SYS_STATUS_DATA::ID => Some(Self::UALBERTA_SYS_STATUS(
35342                UALBERTA_SYS_STATUS_DATA::default(),
35343            )),
35344            UAVCAN_NODE_INFO_DATA::ID => {
35345                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35346            }
35347            UAVCAN_NODE_STATUS_DATA::ID => {
35348                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35349            }
35350            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35351                UTM_GLOBAL_POSITION_DATA::default(),
35352            )),
35353            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35354            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35355            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35356            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35357                VICON_POSITION_ESTIMATE_DATA::default(),
35358            )),
35359            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35360                VIDEO_STREAM_INFORMATION_DATA::default(),
35361            )),
35362            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35363                VIDEO_STREAM_STATUS_DATA::default(),
35364            )),
35365            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35366                VISION_POSITION_ESTIMATE_DATA::default(),
35367            )),
35368            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35369                VISION_SPEED_ESTIMATE_DATA::default(),
35370            )),
35371            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35372            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35373            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35374            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35375            _ => None,
35376        }
35377    }
35378    #[cfg(feature = "arbitrary")]
35379    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35380        match id {
35381            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35382                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35383            )),
35384            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35385                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35386            )),
35387            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35388            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35389            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35390            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35391            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35392                ATTITUDE_QUATERNION_DATA::random(rng),
35393            )),
35394            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35395                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35396            )),
35397            ATTITUDE_TARGET_DATA::ID => {
35398                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35399            }
35400            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35401            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35402            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35403                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35404                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35405                ))
35406            }
35407            AUTOPILOT_VERSION_DATA::ID => {
35408                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35409            }
35410            AVAILABLE_MODES_DATA::ID => {
35411                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35412            }
35413            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35414                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35415            )),
35416            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35417            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35418            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35419            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35420                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35421            )),
35422            CAMERA_FOV_STATUS_DATA::ID => {
35423                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35424            }
35425            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35426                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35427            )),
35428            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35429                CAMERA_INFORMATION_DATA::random(rng),
35430            )),
35431            CAMERA_SETTINGS_DATA::ID => {
35432                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35433            }
35434            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35435                CAMERA_THERMAL_RANGE_DATA::random(rng),
35436            )),
35437            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35438                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35439            )),
35440            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35441                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35442            )),
35443            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35444            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35445            CAN_FILTER_MODIFY_DATA::ID => {
35446                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35447            }
35448            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35449            CELLULAR_CONFIG_DATA::ID => {
35450                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35451            }
35452            CELLULAR_STATUS_DATA::ID => {
35453                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35454            }
35455            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35456                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35457            )),
35458            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35459                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35460            )),
35461            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35462            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35463            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35464            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35465            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35466            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35467                COMPONENT_INFORMATION_DATA::random(rng),
35468            )),
35469            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35470                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35471            )),
35472            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35473                COMPONENT_METADATA_DATA::random(rng),
35474            )),
35475            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35476                CONTROL_SYSTEM_STATE_DATA::random(rng),
35477            )),
35478            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35479                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35480            )),
35481            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35482            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35483            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35484                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35485            )),
35486            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35487            DEBUG_FLOAT_ARRAY_DATA::ID => {
35488                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35489            }
35490            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35491            DISTANCE_SENSOR_DATA::ID => {
35492                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35493            }
35494            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35495            ENCAPSULATED_DATA_DATA::ID => {
35496                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35497            }
35498            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35499            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35500            ESTIMATOR_STATUS_DATA::ID => {
35501                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35502            }
35503            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35504            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35505                EXTENDED_SYS_STATE_DATA::random(rng),
35506            )),
35507            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35508            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35509                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35510            )),
35511            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35512                FLIGHT_INFORMATION_DATA::random(rng),
35513            )),
35514            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35515            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35516            GENERATOR_STATUS_DATA::ID => {
35517                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35518            }
35519            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35520                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35521            )),
35522            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35523                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35524            )),
35525            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35526                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35527            )),
35528            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35529                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35530            )),
35531            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35532                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35533            )),
35534            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35535                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35536                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35537                ))
35538            }
35539            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35540                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35541            )),
35542            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35543                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35544            )),
35545            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35546                GLOBAL_POSITION_INT_DATA::random(rng),
35547            )),
35548            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35549                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35550            )),
35551            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35552                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35553                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35554                ))
35555            }
35556            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35557            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35558            GPS_GLOBAL_ORIGIN_DATA::ID => {
35559                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35560            }
35561            GPS_INJECT_DATA_DATA::ID => {
35562                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35563            }
35564            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35565            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35566            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35567            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35568            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35569            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35570            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35571            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35572            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35573            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35574                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35575            )),
35576            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35577            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35578            HIL_OPTICAL_FLOW_DATA::ID => {
35579                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35580            }
35581            HIL_RC_INPUTS_RAW_DATA::ID => {
35582                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35583            }
35584            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35585            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35586            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35587                HIL_STATE_QUATERNION_DATA::random(rng),
35588            )),
35589            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35590            HYGROMETER_SENSOR_DATA::ID => {
35591                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35592            }
35593            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35594                ILLUMINATOR_STATUS_DATA::random(rng),
35595            )),
35596            ISBD_LINK_STATUS_DATA::ID => {
35597                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35598            }
35599            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35600            LINK_NODE_STATUS_DATA::ID => {
35601                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35602            }
35603            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35604                LOCAL_POSITION_NED_DATA::random(rng),
35605            )),
35606            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35607                LOCAL_POSITION_NED_COV_DATA::random(rng),
35608            )),
35609            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35610                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35611                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35612                ))
35613            }
35614            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35615            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35616            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35617                LOGGING_DATA_ACKED_DATA::random(rng),
35618            )),
35619            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35620            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35621            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35622            LOG_REQUEST_DATA_DATA::ID => {
35623                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35624            }
35625            LOG_REQUEST_END_DATA::ID => {
35626                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35627            }
35628            LOG_REQUEST_LIST_DATA::ID => {
35629                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35630            }
35631            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35632            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35633            MANUAL_SETPOINT_DATA::ID => {
35634                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35635            }
35636            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35637            MESSAGE_INTERVAL_DATA::ID => {
35638                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35639            }
35640            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35641            MISSION_CLEAR_ALL_DATA::ID => {
35642                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35643            }
35644            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35645            MISSION_CURRENT_DATA::ID => {
35646                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35647            }
35648            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35649            MISSION_ITEM_INT_DATA::ID => {
35650                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35651            }
35652            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35653                MISSION_ITEM_REACHED_DATA::random(rng),
35654            )),
35655            MISSION_REQUEST_DATA::ID => {
35656                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35657            }
35658            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35659                MISSION_REQUEST_INT_DATA::random(rng),
35660            )),
35661            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35662                MISSION_REQUEST_LIST_DATA::random(rng),
35663            )),
35664            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35665                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35666            )),
35667            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35668                MISSION_SET_CURRENT_DATA::random(rng),
35669            )),
35670            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35671                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35672            )),
35673            MOUNT_ORIENTATION_DATA::ID => {
35674                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35675            }
35676            NAMED_VALUE_FLOAT_DATA::ID => {
35677                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35678            }
35679            NAMED_VALUE_INT_DATA::ID => {
35680                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35681            }
35682            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35683                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35684            )),
35685            NAV_FILTER_BIAS_DATA::ID => {
35686                Some(Self::NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA::random(rng)))
35687            }
35688            OBSTACLE_DISTANCE_DATA::ID => {
35689                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35690            }
35691            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35692            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35693                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35694            )),
35695            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35696                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35697            )),
35698            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35699                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35700            )),
35701            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35702                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35703            )),
35704            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35705                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35706            )),
35707            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35708                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35709            )),
35710            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35711                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35712            )),
35713            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35714                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35715            )),
35716            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35717                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35718            )),
35719            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35720                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35721            )),
35722            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35723            OPTICAL_FLOW_RAD_DATA::ID => {
35724                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35725            }
35726            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35727                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35728            )),
35729            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35730            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35731                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35732            )),
35733            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35734                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35735            )),
35736            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35737            PARAM_EXT_VALUE_DATA::ID => {
35738                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35739            }
35740            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35741            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35742                PARAM_REQUEST_LIST_DATA::random(rng),
35743            )),
35744            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35745                PARAM_REQUEST_READ_DATA::random(rng),
35746            )),
35747            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35748            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35749            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35750            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35751            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35752            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35753                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35754            )),
35755            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35756                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35757            )),
35758            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35759            PROTOCOL_VERSION_DATA::ID => {
35760                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35761            }
35762            RADIO_CALIBRATION_DATA::ID => {
35763                Some(Self::RADIO_CALIBRATION(RADIO_CALIBRATION_DATA::random(rng)))
35764            }
35765            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35766            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35767            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35768            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35769            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35770            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35771                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35772            )),
35773            RC_CHANNELS_RAW_DATA::ID => {
35774                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35775            }
35776            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35777                RC_CHANNELS_SCALED_DATA::random(rng),
35778            )),
35779            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35780                REQUEST_DATA_STREAM_DATA::random(rng),
35781            )),
35782            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35783            RESOURCE_REQUEST_DATA::ID => {
35784                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35785            }
35786            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35787                RESPONSE_EVENT_ERROR_DATA::random(rng),
35788            )),
35789            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35790                SAFETY_ALLOWED_AREA_DATA::random(rng),
35791            )),
35792            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35793                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35794            )),
35795            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35796            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35797            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35798            SCALED_PRESSURE_DATA::ID => {
35799                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35800            }
35801            SCALED_PRESSURE2_DATA::ID => {
35802                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35803            }
35804            SCALED_PRESSURE3_DATA::ID => {
35805                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35806            }
35807            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35808            SERVO_OUTPUT_RAW_DATA::ID => {
35809                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35810            }
35811            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35812            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35813                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35814            )),
35815            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35816                SET_ATTITUDE_TARGET_DATA::random(rng),
35817            )),
35818            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35819                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35820            )),
35821            SET_HOME_POSITION_DATA::ID => {
35822                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35823            }
35824            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35825            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35826                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35827            )),
35828            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35829                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35830            )),
35831            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35832            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35833                SMART_BATTERY_INFO_DATA::random(rng),
35834            )),
35835            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35836            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35837                STORAGE_INFORMATION_DATA::random(rng),
35838            )),
35839            SUPPORTED_TUNES_DATA::ID => {
35840                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35841            }
35842            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35843            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35844            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35845            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35846            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35847            TERRAIN_REQUEST_DATA::ID => {
35848                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35849            }
35850            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35851            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35852                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35853            )),
35854            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35855                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35856                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35857                ))
35858            }
35859            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35860                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35861                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35862                ))
35863            }
35864            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35865            UALBERTA_SYS_STATUS_DATA::ID => Some(Self::UALBERTA_SYS_STATUS(
35866                UALBERTA_SYS_STATUS_DATA::random(rng),
35867            )),
35868            UAVCAN_NODE_INFO_DATA::ID => {
35869                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35870            }
35871            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35872                UAVCAN_NODE_STATUS_DATA::random(rng),
35873            )),
35874            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35875                UTM_GLOBAL_POSITION_DATA::random(rng),
35876            )),
35877            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
35878            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
35879            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
35880            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35881                VICON_POSITION_ESTIMATE_DATA::random(rng),
35882            )),
35883            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35884                VIDEO_STREAM_INFORMATION_DATA::random(rng),
35885            )),
35886            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35887                VIDEO_STREAM_STATUS_DATA::random(rng),
35888            )),
35889            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35890                VISION_POSITION_ESTIMATE_DATA::random(rng),
35891            )),
35892            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35893                VISION_SPEED_ESTIMATE_DATA::random(rng),
35894            )),
35895            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
35896            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
35897            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
35898            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
35899            _ => None,
35900        }
35901    }
35902    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35903        match self {
35904            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35905            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
35906            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
35907            Self::AIS_VESSEL(body) => body.ser(version, bytes),
35908            Self::ALTITUDE(body) => body.ser(version, bytes),
35909            Self::ATTITUDE(body) => body.ser(version, bytes),
35910            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
35911            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
35912            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
35913            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
35914            Self::AUTH_KEY(body) => body.ser(version, bytes),
35915            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
35916            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
35917            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
35918            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
35919            Self::BATTERY_INFO(body) => body.ser(version, bytes),
35920            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
35921            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
35922            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
35923            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
35924            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
35925            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
35926            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
35927            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
35928            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
35929            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
35930            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
35931            Self::CANFD_FRAME(body) => body.ser(version, bytes),
35932            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
35933            Self::CAN_FRAME(body) => body.ser(version, bytes),
35934            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
35935            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
35936            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
35937            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
35938            Self::COLLISION(body) => body.ser(version, bytes),
35939            Self::COMMAND_ACK(body) => body.ser(version, bytes),
35940            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
35941            Self::COMMAND_INT(body) => body.ser(version, bytes),
35942            Self::COMMAND_LONG(body) => body.ser(version, bytes),
35943            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
35944            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
35945            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
35946            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
35947            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
35948            Self::CURRENT_MODE(body) => body.ser(version, bytes),
35949            Self::DATA_STREAM(body) => body.ser(version, bytes),
35950            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
35951            Self::DEBUG(body) => body.ser(version, bytes),
35952            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
35953            Self::DEBUG_VECT(body) => body.ser(version, bytes),
35954            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
35955            Self::EFI_STATUS(body) => body.ser(version, bytes),
35956            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
35957            Self::ESC_INFO(body) => body.ser(version, bytes),
35958            Self::ESC_STATUS(body) => body.ser(version, bytes),
35959            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
35960            Self::EVENT(body) => body.ser(version, bytes),
35961            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
35962            Self::FENCE_STATUS(body) => body.ser(version, bytes),
35963            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
35964            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
35965            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
35966            Self::FUEL_STATUS(body) => body.ser(version, bytes),
35967            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
35968            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
35969            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
35970            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
35971            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
35972            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
35973            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
35974            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
35975            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
35976            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
35977            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
35978            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35979            Self::GPS2_RAW(body) => body.ser(version, bytes),
35980            Self::GPS2_RTK(body) => body.ser(version, bytes),
35981            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
35982            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
35983            Self::GPS_INPUT(body) => body.ser(version, bytes),
35984            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
35985            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
35986            Self::GPS_RTK(body) => body.ser(version, bytes),
35987            Self::GPS_STATUS(body) => body.ser(version, bytes),
35988            Self::HEARTBEAT(body) => body.ser(version, bytes),
35989            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
35990            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
35991            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
35992            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
35993            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
35994            Self::HIL_GPS(body) => body.ser(version, bytes),
35995            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
35996            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
35997            Self::HIL_SENSOR(body) => body.ser(version, bytes),
35998            Self::HIL_STATE(body) => body.ser(version, bytes),
35999            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36000            Self::HOME_POSITION(body) => body.ser(version, bytes),
36001            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36002            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36003            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36004            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36005            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36006            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36007            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36008            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36009            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36010            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36011            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36012            Self::LOG_DATA(body) => body.ser(version, bytes),
36013            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36014            Self::LOG_ERASE(body) => body.ser(version, bytes),
36015            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36016            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36017            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36018            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36019            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36020            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36021            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36022            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36023            Self::MISSION_ACK(body) => body.ser(version, bytes),
36024            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36025            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36026            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36027            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36028            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36029            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36030            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36031            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36032            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36033            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36034            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36035            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36036            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36037            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36038            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36039            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36040            Self::NAV_FILTER_BIAS(body) => body.ser(version, bytes),
36041            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36042            Self::ODOMETRY(body) => body.ser(version, bytes),
36043            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36044            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36045            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36046            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36047            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36048            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36049            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36050            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36051            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36052            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36053            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36054            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36055            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36056            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36057            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36058            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36059            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36060            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36061            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36062            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36063            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36064            Self::PARAM_SET(body) => body.ser(version, bytes),
36065            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36066            Self::PING(body) => body.ser(version, bytes),
36067            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36068            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36069            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36070            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36071            Self::POWER_STATUS(body) => body.ser(version, bytes),
36072            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36073            Self::RADIO_CALIBRATION(body) => body.ser(version, bytes),
36074            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36075            Self::RAW_IMU(body) => body.ser(version, bytes),
36076            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36077            Self::RAW_RPM(body) => body.ser(version, bytes),
36078            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36079            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36080            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36081            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36082            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36083            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36084            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36085            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36086            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36087            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36088            Self::SCALED_IMU(body) => body.ser(version, bytes),
36089            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36090            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36091            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36092            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36093            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36094            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36095            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36096            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36097            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36098            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36099            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36100            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36101            Self::SET_MODE(body) => body.ser(version, bytes),
36102            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36103            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36104            Self::SIM_STATE(body) => body.ser(version, bytes),
36105            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36106            Self::STATUSTEXT(body) => body.ser(version, bytes),
36107            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36108            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36109            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36110            Self::SYS_STATUS(body) => body.ser(version, bytes),
36111            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36112            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36113            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36114            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36115            Self::TIMESYNC(body) => body.ser(version, bytes),
36116            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36117            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36118            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36119            Self::TUNNEL(body) => body.ser(version, bytes),
36120            Self::UALBERTA_SYS_STATUS(body) => body.ser(version, bytes),
36121            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36122            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36123            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36124            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36125            Self::VFR_HUD(body) => body.ser(version, bytes),
36126            Self::VIBRATION(body) => body.ser(version, bytes),
36127            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36128            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36129            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36130            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36131            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36132            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36133            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36134            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36135            Self::WIND_COV(body) => body.ser(version, bytes),
36136        }
36137    }
36138    fn extra_crc(id: u32) -> u8 {
36139        match id {
36140            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36141            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36142            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36143            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36144            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36145            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36146            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36147            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36148            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36149            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36150            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36151            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36152                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36153            }
36154            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36155            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36156            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36157            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36158            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36159            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36160            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36161            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36162            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36163            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36164            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36165            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36166            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36167            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36168            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36169            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36170            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36171            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36172            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36173            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36174            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36175            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36176            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36177            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36178            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36179            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36180            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36181            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36182            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36183            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36184            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36185            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36186            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36187            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36188            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36189            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36190            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36191            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36192            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36193            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36194            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36195            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36196            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36197            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36198            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36199            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36200            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36201            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36202            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36203            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36204            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36205            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36206            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36207            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36208            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36209            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36210            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36211            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36212                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36213            }
36214            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36215            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36216            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36217            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36218            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36219                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36220            }
36221            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36222            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36223            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36224            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36225            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36226            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36227            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36228            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36229            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36230            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36231            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36232            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36233            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36234            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36235            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36236            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36237            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36238            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36239            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36240            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36241            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36242            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36243            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36244            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36245            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36246            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36247            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36248            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36249            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36250            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36251                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36252            }
36253            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36254            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36255            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36256            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36257            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36258            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36259            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36260            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36261            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36262            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36263            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36264            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36265            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36266            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36267            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36268            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36269            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36270            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36271            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36272            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36273            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36274            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36275            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36276            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36277            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36278            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36279            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36280            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36281            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36282            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36283            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36284            NAV_FILTER_BIAS_DATA::ID => NAV_FILTER_BIAS_DATA::EXTRA_CRC,
36285            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36286            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36287            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36288            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36289            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36290            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36291            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36292            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36293            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36294            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36295            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36296            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36297            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36298            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36299            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36300            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36301            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36302            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36303            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36304            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36305            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36306            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36307            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36308            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36309            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36310            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36311            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36312            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36313            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36314            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36315            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36316            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36317            RADIO_CALIBRATION_DATA::ID => RADIO_CALIBRATION_DATA::EXTRA_CRC,
36318            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36319            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36320            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36321            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36322            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36323            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36324            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36325            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36326            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36327            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36328            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36329            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36330            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36331            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36332            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36333            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36334            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36335            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36336            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36337            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36338            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36339            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36340            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36341            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36342            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36343            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36344            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36345            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36346            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36347                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36348            }
36349            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36350            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36351            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36352            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36353            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36354            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36355            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36356            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36357            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36358            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36359            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36360            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36361            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36362            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36363            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36364                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36365            }
36366            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36367                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36368            }
36369            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36370            UALBERTA_SYS_STATUS_DATA::ID => UALBERTA_SYS_STATUS_DATA::EXTRA_CRC,
36371            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36372            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36373            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36374            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36375            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36376            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36377            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36378            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36379            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36380            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36381            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36382            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36383            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36384            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36385            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36386            _ => 0,
36387        }
36388    }
36389    fn target_system_id(&self) -> Option<u8> {
36390        match self {
36391            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36392            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36393            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36394            Self::CAN_FRAME(inner) => Some(inner.target_system),
36395            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36396            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36397            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36398            Self::COMMAND_INT(inner) => Some(inner.target_system),
36399            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36400            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36401            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36402            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36403            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36404            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36405            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36406            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36407            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36408            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36409            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36410            Self::LOG_ERASE(inner) => Some(inner.target_system),
36411            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36412            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36413            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36414            Self::MISSION_ACK(inner) => Some(inner.target_system),
36415            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36416            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36417            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36418            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36419            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36420            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36421            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36422            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36423            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36424            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36425            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36426            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36427            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36428            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36429            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36430            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36431            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36432            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36433            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36434            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36435            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36436            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36437            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36438            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36439            Self::PARAM_SET(inner) => Some(inner.target_system),
36440            Self::PING(inner) => Some(inner.target_system),
36441            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36442            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36443            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36444            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36445            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36446            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36447            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36448            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36449            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36450            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36451            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36452            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36453            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36454            Self::SET_MODE(inner) => Some(inner.target_system),
36455            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36456            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36457            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36458            Self::TIMESYNC(inner) => Some(inner.target_system),
36459            Self::TUNNEL(inner) => Some(inner.target_system),
36460            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36461            _ => None,
36462        }
36463    }
36464    fn target_component_id(&self) -> Option<u8> {
36465        match self {
36466            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36467            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36468            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36469            Self::CAN_FRAME(inner) => Some(inner.target_component),
36470            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36471            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36472            Self::COMMAND_INT(inner) => Some(inner.target_component),
36473            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36474            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36475            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36476            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36477            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36478            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36479            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36480            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36481            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36482            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36483            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36484            Self::LOG_ERASE(inner) => Some(inner.target_component),
36485            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36486            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36487            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36488            Self::MISSION_ACK(inner) => Some(inner.target_component),
36489            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36490            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36491            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36492            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36493            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36494            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36495            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36496            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36497            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36498            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36499            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36500            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36501            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36502            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36503            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36504            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36505            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36506            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36507            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36508            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36509            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36510            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36511            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36512            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36513            Self::PARAM_SET(inner) => Some(inner.target_component),
36514            Self::PING(inner) => Some(inner.target_component),
36515            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36516            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36517            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36518            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36519            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36520            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36521            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36522            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36523            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36524            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36525            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36526            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36527            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36528            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36529            Self::TIMESYNC(inner) => Some(inner.target_component),
36530            Self::TUNNEL(inner) => Some(inner.target_component),
36531            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36532            _ => None,
36533        }
36534    }
36535}